mirror of
https://github.com/libretro/pcsx2.git
synced 2025-01-11 20:16:15 +00:00
CDVD: check return value of ToLong
Reported by coverity
This commit is contained in:
parent
356429d0e7
commit
c5d727da39
@ -429,7 +429,11 @@ void cdvdReloadElfInfo(wxString elfoverride)
|
||||
static __fi s32 StrToS32(const wxString& str, int base = 10)
|
||||
{
|
||||
long l;
|
||||
str.ToLong(&l, base);
|
||||
if (!str.ToLong(&l, base)) {
|
||||
Console.Error(L"StrToS32: fail to translate '%s' as long", WX_STR(str));
|
||||
return 0;
|
||||
}
|
||||
|
||||
return l;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user