small improvement: when calling parse_list after last element was reached, now PSYC_PARSE_LIST_END is returned

This commit is contained in:
lurchi 2016-09-05 12:37:35 +02:00
parent c593d85742
commit 516231b0ba
1 changed files with 1 additions and 0 deletions

View File

@ -706,6 +706,7 @@ psyc_parse_list (PsycParseListState *state, PsycString *type, PsycString *elem)
ret = PSYC_PARSE_LIST_ELEM;
break;
case PARSE_INSUFFICIENT:
state->cursor = state->buffer.length;
return PSYC_PARSE_LIST_ELEM_LAST;
default: // should not be reached
return PSYC_PARSE_LIST_ERROR;