From: erickson Date: Mon, 24 Sep 2007 02:43:04 +0000 (+0000) Subject: repaired logic bug which left the parser state in the JSON_STATE_IN_KEY X-Git-Tag: osrf_rel_2_0_1~875 X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=422fe5d5b5e4b7667edb0ce1309644456d1c92ab;p=OpenSRF.git repaired logic bug which left the parser state in the JSON_STATE_IN_KEY state after exiting from an empty JSON object. git-svn-id: svn://svn.open-ils.org/OpenSRF/trunk@1091 9efc2488-bf62-4759-914b-345cdb29e865 --- diff --git a/src/libopensrf/osrf_json_parser.c b/src/libopensrf/osrf_json_parser.c index 0837652..37c09f2 100644 --- a/src/libopensrf/osrf_json_parser.c +++ b/src/libopensrf/osrf_json_parser.c @@ -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);