diff options
author | arseny.kapoulkine <arseny.kapoulkine@99668b35-9821-0410-8761-19e4c4f06640> | 2009-11-08 11:27:40 +0000 |
---|---|---|
committer | arseny.kapoulkine <arseny.kapoulkine@99668b35-9821-0410-8761-19e4c4f06640> | 2009-11-08 11:27:40 +0000 |
commit | 4b2059d84d9c0531306eac70cefdd3746f3ebb4e (patch) | |
tree | 8b83074b175890ffe2d8af3377d3e8ae001c4ebf /src/pugixpath.cpp | |
parent | b0f0c03f9c6a5fbd433e64db85c2892a2479e6e5 (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
Diffstat (limited to 'src/pugixpath.cpp')
-rw-r--r-- | src/pugixpath.cpp | 9 |
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;
}
|