aboutsummaryrefslogtreecommitdiff
path: root/engines/agi/keyboard.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'engines/agi/keyboard.cpp')
-rw-r--r--engines/agi/keyboard.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/engines/agi/keyboard.cpp b/engines/agi/keyboard.cpp
index d899a6e202..4ac08492ae 100644
--- a/engines/agi/keyboard.cpp
+++ b/engines/agi/keyboard.cpp
@@ -114,7 +114,7 @@ int AgiEngine::handleController(int key) {
debugC(3, kDebugLevelInput, "key = %04x", key);
- for (i = 0; i < _game.lastController; i++) {
+ for (i = 0; i < MAX_CONTROLLERS; i++) {
if (_game.controllers[i].keycode == key) {
debugC(3, kDebugLevelInput, "event %d: key press", _game.controllers[i].controller);
_game.controllerOccured[_game.controllers[i].controller] = true;