kore

An easy to use, scalable and secure web application framework for writing web APIs in C.
Commits | Files | Refs | README | LICENSE | git clone https://git.kore.io/kore.git

commit 699ba3c0feb5ab8e77a59e34c4514ba2804b92aa
parent 7b5046873a60e51571fd043f0a1c9da5f266d14c
Author: Joris Vink <joris@coders.se>
Date:   Wed, 30 Oct 2019 10:02:51 +0100

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

Diffstat:
src/json.c | 2++
1 file changed, 2 insertions(+), 0 deletions(-)

diff --git a/src/json.c b/src/json.c @@ -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; }