From b55d139ed0368f368c6c9c8f8adfab4c91f1f508 Mon Sep 17 00:00:00 2001 From: Emmanuele Bassi Date: Sat, 3 Apr 2010 14:59:00 +0100 Subject: parser: Do not increment the index variable When parsing an array with a JsonParser with the debugging notes enabled, we get an erroneous increment of the idx variable - which is then passed to the JsonParser::array-element signal. Thanks to: Michael Stapelberg --- json-glib/json-parser.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'json-glib/json-parser.c') diff --git a/json-glib/json-parser.c b/json-glib/json-parser.c index c16d874..cfd883a 100644 --- a/json-glib/json-parser.c +++ b/json-glib/json-parser.c @@ -513,7 +513,7 @@ json_parse_array (JsonParser *parser, } } - JSON_NOTE (PARSER, "Array element %d completed", idx++); + JSON_NOTE (PARSER, "Array element %d completed", idx + 1); json_node_set_parent (element, priv->current_node); json_array_add_element (array, element); -- cgit v1.2.1