diff options
author | Emmanuele Bassi <ebassi@linux.intel.com> | 2010-04-03 14:59:00 +0100 |
---|---|---|
committer | Emmanuele Bassi <ebassi@linux.intel.com> | 2010-04-03 14:59:00 +0100 |
commit | b55d139ed0368f368c6c9c8f8adfab4c91f1f508 (patch) | |
tree | db478ad6a099bc23b8b221ef1db956330143f446 /json-glib/json-parser.c | |
parent | 24567790d30e314ee519c8f3756b3514c0c3fd31 (diff) | |
download | json-glib-b55d139ed0368f368c6c9c8f8adfab4c91f1f508.tar.gz |
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 <michael@stapelberg.de>
Diffstat (limited to 'json-glib/json-parser.c')
-rw-r--r-- | json-glib/json-parser.c | 2 |
1 files changed, 1 insertions, 1 deletions
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); |