allow h_whitespace(p) to succeed on end of input if p succeeds

This commit is contained in:
Sven M. Hallberg 2013-01-09 14:48:02 +01:00
parent ad4aa74b85
commit 2bc03e4e9f
2 changed files with 6 additions and 1 deletions

View file

@ -8,7 +8,7 @@ static HParseResult* parse_whitespace(void* env, HParseState *state) {
bak = state->input_stream;
c = h_read_bits(&state->input_stream, 8, false);
if (state->input_stream.overrun)
return NULL;
break;
} while (isspace(c));
state->input_stream = bak;
return h_do_parse((HParser*)env, state);