mirror of
https://github.com/libretro/scummvm.git
synced 2024-12-18 23:57:32 +00:00
Add guard check to set.key opcode.
svn-id: r41260
This commit is contained in:
parent
ea3373708c
commit
0057d9b9b2
@ -1406,6 +1406,11 @@ cmd(set_cursor_char) {
|
||||
cmd(set_key) {
|
||||
int key;
|
||||
|
||||
if (game.lastController >= MAX_CONTROLLERS) {
|
||||
warning("Number of set.keys exceeded %d", MAX_CONTROLLERS);
|
||||
return;
|
||||
}
|
||||
|
||||
debugC(4, kDebugLevelScripts, "%d %d %d", p0, p1, p2);
|
||||
|
||||
key = 256 * p1 + p0;
|
||||
|
Loading…
Reference in New Issue
Block a user