diff options
author | Emmanuele Bassi <ebassi@gnome.org> | 2016-02-25 09:41:38 +0000 |
---|---|---|
committer | Emmanuele Bassi <ebassi@gnome.org> | 2016-02-25 09:41:38 +0000 |
commit | c34b3541f9d2cb388bc20fecc9cf412d6ab0716d (patch) | |
tree | 7cc4ee33d496632b087e30d8e186080bfb25300b /json-glib/json-parser.c | |
parent | 28c7347150d24383114f06457c3a8d5f5d8eab00 (diff) | |
download | json-glib-c34b3541f9d2cb388bc20fecc9cf412d6ab0716d.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.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/json-glib/json-parser.c b/json-glib/json-parser.c index c46de5b..ee4e765 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; } |