From 4b2059d84d9c0531306eac70cefdd3746f3ebb4e Mon Sep 17 00:00:00 2001 From: "arseny.kapoulkine" Date: Sun, 8 Nov 2009 11:27:40 +0000 Subject: XPath: Fixed minor root step bug - don't select empty nodes git-svn-id: http://pugixml.googlecode.com/svn/trunk@215 99668b35-9821-0410-8761-19e4c4f06640 --- src/pugixpath.cpp | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/pugixpath.cpp b/src/pugixpath.cpp index a2859ec..ba447dd 100644 --- a/src/pugixpath.cpp +++ b/src/pugixpath.cpp @@ -2500,10 +2500,13 @@ namespace pugi { xpath_node_set ns; - ns.push_back(c.root); + if (c.root) + { + ns.push_back(c.root); - apply_predicates(ns, 0, c); - + apply_predicates(ns, 0, c); + } + return ns; } -- cgit v1.2.3