1
0
mirror of https://git.kore.io/kore.git synced 2024-11-10 12:20:37 +01:00

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

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;
}