aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--engines/agi/agi.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/engines/agi/agi.cpp b/engines/agi/agi.cpp
index 6327fa6a1f..4a56fa9f26 100644
--- a/engines/agi/agi.cpp
+++ b/engines/agi/agi.cpp
@@ -219,6 +219,11 @@ void AgiEngine::processEvents() {
key = KEY_BACKSPACE;
break;
default:
+ // FIXME: This fixes assertions with isalpha below, but it essentially filters
+ // out all function keys (control, alt and shift)
+ if (key > 255)
+ break;
+
// FIXME: We let lots of keys slip through here unchanged, passing our internal
// keycode values directly to the AGI core. Do we really want that???
if (isalpha(key)) {