From 808292e424a2554b7e2b3f0fd0e86120c1dbabd5 Mon Sep 17 00:00:00 2001 From: Sergio <42090377+SSUPII@users.noreply.github.com> Date: Sat, 25 Mar 2023 13:15:47 +0100 Subject: Fixed unhandled error status for LastSep(std::string) (#1645) --- src/frontend/qt_sdl/ROMManager.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/frontend') 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 -- cgit v1.2.3