From c9c74f751c43aafe826cd40de608b4e6abf6c8bd Mon Sep 17 00:00:00 2001 From: Nemoumbra Date: Mon, 11 Aug 2025 01:15:44 +0300 Subject: [PATCH] Fixed an out-of-range access crash --- Core/HLE/HLE.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Core/HLE/HLE.cpp b/Core/HLE/HLE.cpp index 3d588fee3b..b11420932f 100644 --- a/Core/HLE/HLE.cpp +++ b/Core/HLE/HLE.cpp @@ -905,7 +905,7 @@ const HLEFunction *GetSyscallFuncPointer(MIPSOpcode op) { int funcnum = callno & 0xFFF; int modulenum = (callno & 0xFF000) >> 12; if (funcnum == 0xfff) { - std::string_view modName = modulenum > (int)moduleDB.size() ? "(unknown)" : moduleDB[modulenum].name; + std::string_view modName = modulenum >= (int)moduleDB.size() ? "(unknown)" : moduleDB[modulenum].name; ERROR_LOG(Log::HLE, "Unknown syscall: Module: '%.*s' (module: %d func: %d)", (int)modName.size(), modName.data(), modulenum, funcnum); return NULL; }