From 00e0e72bca1c5a8189753f50fe8a71dddc93de09 Mon Sep 17 00:00:00 2001 From: ehofman Date: Sun, 21 Mar 2004 21:54:51 +0000 Subject: [PATCH] Frederic Bouvier: If the input string of sgSplitPath is empty, it returned a list with one empty string, not an empty list. --- simgear/misc/sg_path.cxx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/simgear/misc/sg_path.cxx b/simgear/misc/sg_path.cxx index eee649f7..95e2a505 100644 --- a/simgear/misc/sg_path.cxx +++ b/simgear/misc/sg_path.cxx @@ -189,7 +189,8 @@ string_list sgPathSplit( const string &search_path ) { result.push_back( tmp.substr(0, index) ); tmp = tmp.substr( index + 1 ); } else { - result.push_back( tmp ); + if ( !tmp.empty() ) + result.push_back( tmp ); done = true; } } -- 2.39.5