commit | d990ee512ecd96db339afa8398d011a6a13f7372 | [log] [tgz] |
---|---|---|
author | Michal Vasko <mvasko@cesnet.cz> | Fri Apr 21 14:03:56 2023 +0200 |
committer | Michal Vasko <mvasko@cesnet.cz> | Fri Apr 21 14:03:56 2023 +0200 |
tree | ae77b8e87f84ec86b3f66554c6c1c3bcbe808941 | |
parent | b81b5eb12c7b4bca1ae2ebf473c9ecc184382c4a [diff] [blame] |
parser json BUGFIX key detection Fixes #2009
diff --git a/src/parser_json.c b/src/parser_json.c index 9c5c6c7..2509723 100644 --- a/src/parser_json.c +++ b/src/parser_json.c
@@ -385,8 +385,8 @@ if (!is_attr && !prefix) { for (i = 0; i < key_set.count; ++i) { - snode = (const struct lysc_node *)key_set.objs[i]; - if (!ly_strncmp(snode->name, name, name_len)) { + if (!ly_strncmp(key_set.snodes[i]->name, name, name_len)) { + snode = key_set.snodes[i]; break; } }