mirror of
https://github.com/libretro/scummvm.git
synced 2025-04-02 23:01:42 +00:00
SLUDGE: Fix potential buffer overrun
This commit is contained in:
parent
8321efe0ed
commit
6dcf0939bf
@ -2571,7 +2571,7 @@ BuiltReturn callBuiltIn(int whichFunc, int numParams, LoadedFunction *fun) {
|
||||
}
|
||||
|
||||
const char *getBuiltInName(int num) {
|
||||
if (num > NUM_FUNCS)
|
||||
if (num >= NUM_FUNCS)
|
||||
error("getBuiltInName: incorrect builtin number. %d > %d", num, NUM_FUNCS);
|
||||
|
||||
return builtInFunctionArray[num].name;
|
||||
|
Loading…
x
Reference in New Issue
Block a user