Skip to content

Commit

Permalink
parser xml BUGFIX opaque node without a namespace (#2181)
Browse files Browse the repository at this point in the history
Co-authored-by: zhangtao 00621101 <zhangtao387@huawei.com>
  • Loading branch information
zhangtaog and zhangtao 00621101 authored Feb 21, 2024
1 parent 42c5a1c commit b348a8b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/parser_xml.c
Original file line number Diff line number Diff line change
Expand Up @@ -481,7 +481,7 @@ lydxml_get_hints_opaq(const char *name, size_t name_len, const char *value, size
opaq = (struct lyd_node_opaq *)first;
assert(opaq->format == LY_VALUE_XML);
if (!ly_strncmp(opaq->name.name, name, name_len) &&
((ns && !strcmp(opaq->name.module_ns, ns)) || (!ns && !opaq->name.module_ns))) {
((ns && opaq->name.module_ns && !strcmp(opaq->name.module_ns, ns)) || (!ns && !opaq->name.module_ns))) {
if (opaq->value && opaq->value[0]) {
/* leaf-list nodes */
opaq->hints |= LYD_NODEHINT_LEAFLIST;
Expand Down

0 comments on commit b348a8b

Please sign in to comment.