aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2014-08-21 15:42:16 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2014-08-21 15:42:16 +0200
commitb4c3242a763e0461f454cc29be28c2ab26e4a495 (patch)
tree742d2a61daff4304c3824b76e985932bbda6d82b
parentda35fcc74f1e1aa428f66ed05747f613b6622f3f (diff)
Fix path handling bug
-rw-r--r--examples/cxx/tree/embedded/xsdbin.cxx2
1 files changed, 1 insertions, 1 deletions
diff --git a/examples/cxx/tree/embedded/xsdbin.cxx b/examples/cxx/tree/embedded/xsdbin.cxx
index 656b830..c28590f 100644
--- a/examples/cxx/tree/embedded/xsdbin.cxx
+++ b/examples/cxx/tree/embedded/xsdbin.cxx
@@ -334,7 +334,7 @@ main (int argc, char* argv[])
//
string::size_type p (base.rfind ('/')), p1 (base.rfind ('\\'));
- if (p1 != string::npos && p1 > p)
+ if (p1 != string::npos && (p == string::npos || p1 > p))
p = p1;
if (p != string::npos)