summaryrefslogtreecommitdiff
path: root/json-glib/json-parser.c
diff options
context:
space:
mode:
authorEmmanuele Bassi <ebassi@linux.intel.com>2010-04-03 14:59:00 +0100
committerEmmanuele Bassi <ebassi@linux.intel.com>2010-04-03 14:59:00 +0100
commitb55d139ed0368f368c6c9c8f8adfab4c91f1f508 (patch)
treedb478ad6a099bc23b8b221ef1db956330143f446 /json-glib/json-parser.c
parent24567790d30e314ee519c8f3756b3514c0c3fd31 (diff)
downloadjson-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.c2
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);