diff options
author | D G Turner | 2012-06-29 23:37:11 +0100 |
---|---|---|
committer | D G Turner | 2012-06-29 23:37:11 +0100 |
commit | 4789e0f02665a8cc8cf0b814d65e71d38f88a5f1 (patch) | |
tree | 588c7bb5c56e9e251f410e5875c5de3d5e61f6b9 | |
parent | 100ff974cb38304890afa96f43259b55464bd888 (diff) | |
download | scummvm-rg350-4789e0f02665a8cc8cf0b814d65e71d38f88a5f1.tar.gz scummvm-rg350-4789e0f02665a8cc8cf0b814d65e71d38f88a5f1.tar.bz2 scummvm-rg350-4789e0f02665a8cc8cf0b814d65e71d38f88a5f1.zip |
LURE: Fix engine crash in copy protection screen.
Fixes bug #3539031 - "LURE: Crash at Copy Protection Screen".
Previously, the code didn't prevent keyboard events with modifiers being
used. Since the ascii values for these were outside the 0-9 numeric
range, this resulted in an invalid frame number being used and thus the
engine aborted at an asertion.
-rw-r--r-- | engines/lure/surface.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/engines/lure/surface.cpp b/engines/lure/surface.cpp index 4d63647af5..7af9d665de 100644 --- a/engines/lure/surface.cpp +++ b/engines/lure/surface.cpp @@ -1349,7 +1349,7 @@ bool CopyProtectionDialog::show() { while (!engine.shouldQuit()) { while (events.pollEvent() && (_charIndex < 4)) { - if (events.type() == Common::EVENT_KEYDOWN) { + if (events.type() == Common::EVENT_KEYDOWN && !(events.event().kbd.flags & Common::KBD_NON_STICKY)) { if ((events.event().kbd.keycode == Common::KEYCODE_BACKSPACE) && (_charIndex > 0)) { // Remove the last number typed --_charIndex; |