summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorarseny.kapoulkine <arseny.kapoulkine@99668b35-9821-0410-8761-19e4c4f06640>2009-11-08 11:27:40 +0000
committerarseny.kapoulkine <arseny.kapoulkine@99668b35-9821-0410-8761-19e4c4f06640>2009-11-08 11:27:40 +0000
commit4b2059d84d9c0531306eac70cefdd3746f3ebb4e (patch)
tree8b83074b175890ffe2d8af3377d3e8ae001c4ebf
parentb0f0c03f9c6a5fbd433e64db85c2892a2479e6e5 (diff)
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
-rw-r--r--src/pugixpath.cpp9
1 files 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;
}