fixed path-1, as suggested by @t-mat

This commit is contained in:
Yann Collet 2016-12-08 02:47:42 +01:00
parent 7e2d4c4c08
commit 0280cf40dd

View File

@ -264,7 +264,7 @@ static const char* lastNameFromPath(const char* path)
{
const char* name = strrchr(path, '/');
if (name==NULL) name = strrchr(path, '\\'); /* windows */
if (name==NULL) name = path-1;
if (name==NULL) return path;
return name+1;
}