fix npos comparison check in baseName method

This commit is contained in:
Edward Rudd 2014-01-06 12:45:01 -05:00
parent e9cf77dbce
commit c60ffa6384
1 changed files with 3 additions and 3 deletions

View File

@ -110,12 +110,12 @@ void Config::read()
static std::string baseName(const std::string &path)
{
size_t pos = path.find_last_of("/\\") + 1;
size_t pos = path.find_last_of("/\\");
if (pos == path.npos)
pos = 0;
return path;
return path.substr(pos);
return path.substr(pos + 1);
}
void Config::readGameINI()