[Scummvm-git-logs] scummvm master -> ce1bc7870591b51939be34f7ea9730335ea1cf1a
aquadran
aquadran at gmail.com
Mon Mar 8 07:09:30 UTC 2021
This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .
Summary:
ce1bc78705 ICB: Added safe check for setKeyState too
Commit: ce1bc7870591b51939be34f7ea9730335ea1cf1a
https://github.com/scummvm/scummvm/commit/ce1bc7870591b51939be34f7ea9730335ea1cf1a
Author: PaweÅ KoÅodziejski (aquadran at gmail.com)
Date: 2021-03-08T08:09:25+01:00
Commit Message:
ICB: Added safe check for setKeyState too
Changed paths:
engines/icb/direct_input.cpp
diff --git a/engines/icb/direct_input.cpp b/engines/icb/direct_input.cpp
index 2e94604b44..4771e3a643 100644
--- a/engines/icb/direct_input.cpp
+++ b/engines/icb/direct_input.cpp
@@ -45,7 +45,12 @@ void Init_direct_input() {
SetDefaultKeys();
}
-void setKeyState(Common::KeyCode key, bool pressed) { keyboard_buf_scancodes[key] = pressed; }
+void setKeyState(Common::KeyCode key, bool pressed) {
+ if (key >= Common::KEYCODE_LAST)
+ return;
+
+ keyboard_buf_scancodes[key] = pressed;
+}
uint32 Get_DI_key_press() {
for (uint32 i = 0; i < Common::KEYCODE_LAST; i++) {
More information about the Scummvm-git-logs
mailing list