buffer overflow fix when compiling with vc8

This commit is contained in:
Zachary Pavlov 2007-07-16 18:04:52 +00:00
parent cff3753ef5
commit 5d6bbfa383

View File

@ -462,7 +462,7 @@ read_line(string line) {
} }
} }
if (!_in_for && !failed_if()) { if (!_in_for && !failed_if() && line.length() > p+1) {
if(line[p+1]==COMMAND_PREFIX) { if(line[p+1]==COMMAND_PREFIX) {
// double prefix at start of line indicates echo single prefix, like '\\' in C // double prefix at start of line indicates echo single prefix, like '\\' in C
line.erase(0,1); line.erase(0,1);