1
0
mirror of https://gitlab.gnome.org/GNOME/libxml2.git synced 2025-07-29 11:41:22 +03:00

fixing #61673 part I, do not loose doc information when copying result

* xpath.c: fixing #61673 part I, do not loose doc information
  when copying result value trees.
Daniel
This commit is contained in:
Daniel Veillard
2001-10-06 13:08:27 +00:00
parent 556c668f04
commit 6ab38386cc
2 changed files with 7 additions and 1 deletions

View File

@ -2755,7 +2755,8 @@ xmlXPathObjectCopy(xmlXPathObjectPtr val) {
if ((val->nodesetval != NULL) &&
(val->nodesetval->nodeTab != NULL)) {
ret->boolval = 1;
ret->user = xmlCopyNode(val->nodesetval->nodeTab[0], 1);
ret->user = xmlDocCopyNode(val->nodesetval->nodeTab[0],
val->nodesetval->nodeTab[0]->doc, 1);
ret->nodesetval = xmlXPathNodeSetCreate(
(xmlNodePtr) ret->user);
} else