Fix path separator finding in Windows
authorparasti <parasti@78b8d119-cf0a-0410-b17c-f493084dd1d7>
Thu, 25 Nov 2010 19:32:34 +0000 (19:32 +0000)
committerparasti <parasti@78b8d119-cf0a-0410-b17c-f493084dd1d7>
Thu, 25 Nov 2010 19:32:34 +0000 (19:32 +0000)
git-svn-id: https://s.snth.net/svn/neverball/trunk@3375 78b8d119-cf0a-0410-b17c-f493084dd1d7

share/common.c

index d5dcdc7..10d5b76 100644 (file)
@@ -228,7 +228,7 @@ static const char *path_last_sep(const char *path)
     {
         const char *tmp;
 
-        if ((tmp = strrchr(sep, '\\')))
+        if ((tmp = strrchr(path, '\\')) && sep < tmp)
             sep = tmp;
     }
 #endif