1
0
mirror of https://gitlab.gnome.org/GNOME/libxml2.git synced 2025-03-25 10:50:08 +03:00

xinclude: Fix 'last' pointer in xmlXIncludeCopyNode

Also set the 'last' pointer for the root node.

Fixes https://gitlab.gnome.org/GNOME/libxslt/-/issues/93
This commit is contained in:
Nick Wellnhofer 2023-09-08 14:52:22 +02:00
parent f369154fce
commit 4aa08c80b7

View File

@ -727,10 +727,11 @@ xmlXIncludeCopyNode(xmlXIncludeCtxtPtr ctxt, xmlNodePtr elem,
return(result);
while (cur->next == NULL) {
if (insertParent != NULL)
insertParent->last = insertLast;
cur = cur->parent;
if (cur == elem)
return(result);
insertParent->last = insertLast;
insertLast = insertParent;
insertParent = insertParent->parent;
}