Make sure json offset advanced upon end of object/array.

This commit is contained in:
Joris Vink 2019-10-30 10:02:51 +01:00
parent 7b5046873a
commit 699ba3c0fe
1 changed files with 2 additions and 0 deletions

View File

@ -498,6 +498,7 @@ json_parse_object(struct kore_json *json, struct kore_json_item *object)
switch (ch) {
case '}':
json->offset++;
ret = KORE_RESULT_OK;
goto cleanup;
case '"':
@ -589,6 +590,7 @@ json_parse_array(struct kore_json *json, struct kore_json_item *array)
goto cleanup;
if (ch == ']') {
json->offset++;
ret = KORE_RESULT_OK;
goto cleanup;
}