repaired logic bug which left the parser state in the JSON_STATE_IN_KEY
authorerickson <erickson@9efc2488-bf62-4759-914b-345cdb29e865>
Mon, 24 Sep 2007 02:43:04 +0000 (02:43 +0000)
committererickson <erickson@9efc2488-bf62-4759-914b-345cdb29e865>
Mon, 24 Sep 2007 02:43:04 +0000 (02:43 +0000)
state after exiting from an empty JSON object.

git-svn-id: svn://svn.open-ils.org/OpenSRF/trunk@1091 9efc2488-bf62-4759-914b-345cdb29e865

src/libopensrf/osrf_json_parser.c

index 0837652..37c09f2 100644 (file)
@@ -428,6 +428,7 @@ int jsonParseChunk( jsonParserContext* ctx, char* data, int datalen, int flags )
                        case '}' : /* ending an object */
                                if( ctx->handler->handleEndObject) 
                                        ctx->handler->handleEndObject( ctx->userData ); 
+                JSON_STATE_REMOVE(ctx, JSON_STATE_IN_KEY);
                                JSON_STATE_POP(ctx);
                                if( JSON_STATE_PEEK(ctx) == NULL )
                                        JSON_STATE_SET(ctx, JSON_STATE_IS_DONE);