summaryrefslogtreecommitdiff
path: root/src/cppunit/TestPath.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/cppunit/TestPath.cpp')
-rw-r--r--src/cppunit/TestPath.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/cppunit/TestPath.cpp b/src/cppunit/TestPath.cpp
index 5ff1466..a2783a2 100644
--- a/src/cppunit/TestPath.cpp
+++ b/src/cppunit/TestPath.cpp
@@ -226,7 +226,10 @@ bool
TestPath::splitPathString( const std::string &pathAsString,
PathTestNames &testNames )
{
- bool isRelative = pathAsString.length() && pathAsString[0] != '/';
+ if ( pathAsString.empty() )
+ return true;
+
+ bool isRelative = pathAsString[0] != '/';
int index = (isRelative ? 0 : 1);
while ( true )