aboutsummaryrefslogtreecommitdiff
path: root/src/frontend
diff options
context:
space:
mode:
authorSergio <42090377+SSUPII@users.noreply.github.com>2023-03-25 13:15:47 +0100
committerGitHub <noreply@github.com>2023-03-25 13:15:47 +0100
commit808292e424a2554b7e2b3f0fd0e86120c1dbabd5 (patch)
treec4dba6dcce844321b635a8d190e0c52d87624346 /src/frontend
parent79dfb8dc8f356834f0b6cf7baf73f77552b08923 (diff)
Fixed unhandled error status for LastSep(std::string) (#1645)
Diffstat (limited to 'src/frontend')
-rw-r--r--src/frontend/qt_sdl/ROMManager.cpp3
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