npos undefined. Use -1 instead

This commit is contained in:
Flyinghead 2018-07-18 19:32:51 +02:00
parent e637dcf8f9
commit ff08d93019
1 changed files with 2 additions and 2 deletions

View File

@ -997,10 +997,10 @@ static string get_eeprom_file_path()
cfgLoadStr("config", "image", image_path, "naomi_boot.bin");
string eeprom_file = image_path;
size_t lastindex = eeprom_file.find_last_of("/");
if (lastindex != npos)
if (lastindex != -1)
eeprom_file = eeprom_file.substr(lastindex + 1);
lastindex = eeprom_file.find_last_of(".");
if (lastindex != npos)
if (lastindex != -1)
eeprom_file = eeprom_file.substr(0, lastindex);
eeprom_file = eeprom_file + ".eeprom";
return get_writable_data_path("/data/") + eeprom_file;