[json-glib] parser: Do not increment the index variable
- From: Emmanuele Bassi <ebassi src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [json-glib] parser: Do not increment the index variable
- Date: Sat, 3 Apr 2010 14:04:49 +0000 (UTC)
commit b55d139ed0368f368c6c9c8f8adfab4c91f1f508
Author: Emmanuele Bassi <ebassi linux intel com>
Date: Sat Apr 3 14:59:00 2010 +0100
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>
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);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]