fixed a flaw in the json writer function
This commit is contained in:
parent
e516c64beb
commit
4cbcc38308
@ -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:
|
case MIO_JSON_INST_START_OBJECT:
|
||||||
if (sn->state != MIO_JSON_STATE_START && sn->state != MIO_JSON_STATE_IN_ARRAY &&
|
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);
|
if (sn->index > 0) WRITE_COMMA (jsonwr);
|
||||||
sn->index++;
|
sn->index++;
|
||||||
sn->obj_awaiting_val = 0;
|
sn->obj_awaiting_val = 0;
|
||||||
|
Loading…
Reference in New Issue
Block a user