commit | 513b87daa2b5022eb49cf80610c37f912e80bcea | [log] [tgz] |
---|---|---|
author | Michal Vasko <mvasko@cesnet.cz> | Fri Aug 04 14:03:40 2023 +0200 |
committer | Michal Vasko <mvasko@cesnet.cz> | Fri Aug 04 14:03:40 2023 +0200 |
tree | 0b406ef1bd12980daad215d7ac9a135035c24da1 | |
parent | 838c6c6adb552964014de24c5d5b2aec448e0358 [diff] [blame] |
xpath BUGFIX adding hash of the root node
diff --git a/src/xpath.c b/src/xpath.c index 0f1eaae..8fe2d51 100644 --- a/src/xpath.c +++ b/src/xpath.c
@@ -701,14 +701,14 @@ assert(!r); (void)r; - if (hnode.node == node) { + if ((hnode.node == node) && (hnode.type == type)) { /* it was just added, do not add it twice */ - node = NULL; + return; } } } - if (set->ht && node) { + if (set->ht) { /* add the new node into hash table */ hnode.node = node; hnode.type = type;