aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFilippos Karapetis2007-12-20 17:04:15 +0000
committerFilippos Karapetis2007-12-20 17:04:15 +0000
commit193760a40f5361ad8b319fe256a0b03d2b949a60 (patch)
treec9ab9ba5d79f36cc65344f5ca7a5e44b2e78180e
parent276c67407b07b40a9e8f567f03e86479baaa7231 (diff)
downloadscummvm-rg350-193760a40f5361ad8b319fe256a0b03d2b949a60.tar.gz
scummvm-rg350-193760a40f5361ad8b319fe256a0b03d2b949a60.tar.bz2
scummvm-rg350-193760a40f5361ad8b319fe256a0b03d2b949a60.zip
Fix for isalpha() assertions
svn-id: r29924
-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)) {