[Scummvm-git-logs] scummvm master -> 2ab0a909e88b1ed1d34cda0ddc941100975ebb39

aquadran aquadran at gmail.com
Mon Mar 8 06:55:11 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:
2ab0a909e8 ICB: Added range check for input key code


Commit: 2ab0a909e88b1ed1d34cda0ddc941100975ebb39
    https://github.com/scummvm/scummvm/commit/2ab0a909e88b1ed1d34cda0ddc941100975ebb39
Author: Paweł Kołodziejski (aquadran at gmail.com)
Date: 2021-03-08T07:55:06+01:00

Commit Message:
ICB: Added range check for input key code

Changed paths:
    engines/icb/direct_input.cpp


diff --git a/engines/icb/direct_input.cpp b/engines/icb/direct_input.cpp
index a51d89a297..5462ad9cb8 100644
--- a/engines/icb/direct_input.cpp
+++ b/engines/icb/direct_input.cpp
@@ -72,6 +72,9 @@ bool8 Read_DI_once_keys(uint32 key) {
 	//      0 not pressed down currently
 	//      1 pressed down
 
+	if (key >= 512)
+		FALSE8;
+
 	// set repeat
 	if (keyboard_buf_scancodes[key] && (repeats_scancodes[key]))
 		return (0); // key is still pressed so return 0
@@ -89,6 +92,9 @@ bool8 Read_DI_keys(uint32 key) {
 	//      0 not pressed down currently
 	//      1 pressed down
 
+	if (key >= 512)
+		FALSE8;
+
 	// set repeat
 	repeats_scancodes[key] = keyboard_buf_scancodes[key];
 




More information about the Scummvm-git-logs mailing list