summaryrefslogtreecommitdiff
path: root/json-glib/json-parser.c
diff options
context:
space:
mode:
authorEmmanuele Bassi <ebassi@gnome.org>2016-02-25 09:41:38 +0000
committerEmmanuele Bassi <ebassi@gnome.org>2016-02-25 09:47:36 +0000
commit12389dcce39e5248014ef645fd5df583212b415a (patch)
treece5c33132b6384e6b3e8a2372627de227a645fd6 /json-glib/json-parser.c
parent6cf5f7c66896c8e7276e5a8d115beb3f5a263ce4 (diff)
downloadjson-glib-12389dcce39e5248014ef645fd5df583212b415a.tar.gz
parser: Correctly increment the array index counter
We pass the counter to the JsonParser::array-element signal, but we never really increment it.
Diffstat (limited to 'json-glib/json-parser.c')
-rw-r--r--json-glib/json-parser.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/json-glib/json-parser.c b/json-glib/json-parser.c
index 08049ca..c0fa855 100644
--- a/json-glib/json-parser.c
+++ b/json-glib/json-parser.c
@@ -507,7 +507,7 @@ json_parse_array (JsonParser *parser,
}
}
- JSON_NOTE (PARSER, "Array element %d completed", idx + 1);
+ JSON_NOTE (PARSER, "Array element %d completed", idx);
json_node_set_parent (element, priv->current_node);
json_array_add_element (array, element);
@@ -515,6 +515,7 @@ json_parse_array (JsonParser *parser,
array,
idx);
+ idx += 1;
token = next_token;
}