Fix problem with \? at end of input format when no more input is available. Used to work. Works again (but was not really intended)

This commit is contained in:
2018-09-19 16:36:01 +02:00
parent 624cc0134a
commit b7b3bc0af0

View File

@ -1315,12 +1315,12 @@ normal_format:
break; break;
} }
case StreamProtocolParser::skip: case StreamProtocolParser::skip:
// ignore next input byte // ignore next input byte (if exists)
consumedInput++; if (consumedInput < inputLine.length()) consumedInput++;
break; break;
case StreamProtocolParser::whitespace: case StreamProtocolParser::whitespace:
// any number of whitespace (including 0) // any number of whitespace (including 0)
while (isspace(inputLine[consumedInput])) consumedInput++; while (consumedInput < inputLine.length() && isspace(inputLine[consumedInput])) consumedInput++;
break; break;
case esc: case esc:
// escaped literal byte // escaped literal byte