[libxml2] Don't change context node in xmlXPathRoot



commit 938835e763277684274ac31afc08fc40fa419aae
Author: Nick Wellnhofer <wellnhofer aevum de>
Date:   Thu May 25 01:21:57 2017 +0200

    Don't change context node in xmlXPathRoot

 xpath.c |    3 +--
 1 files changed, 1 insertions(+), 2 deletions(-)
---
diff --git a/xpath.c b/xpath.c
index 601763e..1e98ddc 100644
--- a/xpath.c
+++ b/xpath.c
@@ -8477,9 +8477,8 @@ void
 xmlXPathRoot(xmlXPathParserContextPtr ctxt) {
     if ((ctxt == NULL) || (ctxt->context == NULL))
        return;
-    ctxt->context->node = (xmlNodePtr) ctxt->context->doc;
     valuePush(ctxt, xmlXPathCacheNewNodeSet(ctxt->context,
-       ctxt->context->node));
+       (xmlNodePtr) ctxt->context->doc));
 }
 
 /************************************************************************


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]