diff options
-rw-r--r-- | src/frontend/qt_sdl/ROMManager.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/frontend/qt_sdl/ROMManager.cpp b/src/frontend/qt_sdl/ROMManager.cpp index e5479b2..ac525b7 100644 --- a/src/frontend/qt_sdl/ROMManager.cpp +++ b/src/frontend/qt_sdl/ROMManager.cpp @@ -521,7 +521,8 @@ bool LoadROM(QStringList filepath, bool reset) filelen = (u32)len; int pos = LastSep(filename); - basepath = filename.substr(0, pos); + if(pos != -1) + basepath = filename.substr(0, pos); romname = filename.substr(pos+1); } #ifdef ARCHIVE_SUPPORT_ENABLED |