1
0
mirror of https://gitlab.gnome.org/GNOME/libxml2.git synced 2025-10-21 14:53:44 +03:00

tree: Fix tree iteration in xmlDOMWrapRemoveNode

We didn't descend into elements having attributes.
This commit is contained in:
Nick Wellnhofer
2024-03-13 12:15:30 +01:00
parent 4a90ce089c
commit be2c26fb67

10
tree.c
View File

@@ -8012,8 +8012,16 @@ next_sibling:
if (node->next != NULL)
node = node->next;
else {
int type = node->type;
node = node->parent;
goto next_sibling;
if ((type == XML_ATTRIBUTE_NODE) &&
(node != NULL) &&
(node->children != NULL)) {
node = node->children;
} else {
goto next_sibling;
}
}
} while (node != NULL);