fixed a flaw in the json writer function
This commit is contained in:
		@ -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;
 | 
			
		||||
 | 
			
		||||
		Reference in New Issue
	
	Block a user