[Scummvm-git-logs] scummvm master -> 7da3d486d26a864ac3a734b0e508f8fd3e5f7608

aquadran noreply at scummvm.org
Wed Jan 5 15:11:00 UTC 2022


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:
7da3d486d2 GRIM: Filter out of range keycodes


Commit: 7da3d486d26a864ac3a734b0e508f8fd3e5f7608
    https://github.com/scummvm/scummvm/commit/7da3d486d26a864ac3a734b0e508f8fd3e5f7608
Author: Paweł Kołodziejski (aquadran at gmail.com)
Date: 2022-01-05T16:10:54+01:00

Commit Message:
GRIM: Filter out of range keycodes

Changed paths:
    engines/grim/grim_controls.cpp


diff --git a/engines/grim/grim_controls.cpp b/engines/grim/grim_controls.cpp
index 0446d8bf52b..f46073a97f7 100644
--- a/engines/grim/grim_controls.cpp
+++ b/engines/grim/grim_controls.cpp
@@ -291,6 +291,10 @@ void GrimEngine::handleChars(Common::EventType operation, const Common::KeyState
 
 void GrimEngine::handleControls(Common::EventType operation, const Common::KeyState &key) {
 	// If we're not supposed to handle the key then don't
+	if ((int)key.keycode >= KEYCODE_EXTRA_LAST) {
+		warning("keycode: %d not enabled", key.keycode);
+		return;
+	}
 	if (!_controlsEnabled[key.keycode])
 		return;
 




More information about the Scummvm-git-logs mailing list