From 7a77020c29455864c768636781fa2fb17bebb950 Mon Sep 17 00:00:00 2001 From: cozis Date: Tue, 19 Apr 2022 00:37:07 +0200 Subject: [PATCH] parser bug fix --- xjson.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/xjson.c b/xjson.c index 08d9bdf..753898b 100644 --- a/xjson.c +++ b/xjson.c @@ -498,7 +498,10 @@ static xj_value *parse_object(context_t *ctx) } if(ctx->str[ctx->i] == '}') /* Empty object */ + { + ctx->i += 1; // Skip '}'. return xj_value_object__nocheck(NULL, 0, ctx->alloc, ctx->error); + } xj_value *head = NULL; xj_value **tail = &head;