From 4cbcc38308231d4f69ab5470351fcaf62e5bd31a Mon Sep 17 00:00:00 2001 From: hyung-hwan Date: Mon, 12 Jul 2021 17:04:44 +0000 Subject: [PATCH] fixed a flaw in the json writer function --- mio/lib/json.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mio/lib/json.c b/mio/lib/json.c index 8cf2825..fe39ef9 100644 --- a/mio/lib/json.c +++ b/mio/lib/json.c @@ -1130,7 +1130,7 @@ int mio_jsonwr_write (mio_jsonwr_t* jsonwr, mio_json_inst_t inst, int is_uchars, case MIO_JSON_INST_START_OBJECT: if (sn->state != MIO_JSON_STATE_START && sn->state != MIO_JSON_STATE_IN_ARRAY && - !(sn->state == MIO_JSON_STATE_IN_OBJECT && !sn->obj_awaiting_val)) goto incompatible_inst; + !(sn->state == MIO_JSON_STATE_IN_OBJECT && sn->obj_awaiting_val)) goto incompatible_inst; if (sn->index > 0) WRITE_COMMA (jsonwr); sn->index++; sn->obj_awaiting_val = 0;