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:47:36 +0000 |
| commit | 12389dcce39e5248014ef645fd5df583212b415a (patch) | |
| tree | ce5c33132b6384e6b3e8a2372627de227a645fd6 /json-glib/json-parser.c | |
| parent | 6cf5f7c66896c8e7276e5a8d115beb3f5a263ce4 (diff) | |
| download | json-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.c | 3 |
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; } |
