[Scummvm-git-logs] scummvm master -> baa95243767964d89892fcbfd6ed8eee9be61f28

athrxx noreply at scummvm.org
Sun Jul 17 16:18:10 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:
baa9524376 KYRA: (LOK/KOR) - fix hangul input glitch


Commit: baa95243767964d89892fcbfd6ed8eee9be61f28
    https://github.com/scummvm/scummvm/commit/baa95243767964d89892fcbfd6ed8eee9be61f28
Author: athrxx (athrxx at scummvm.org)
Date: 2022-07-17T18:17:56+02:00

Commit Message:
KYRA: (LOK/KOR) - fix hangul input glitch

(assert could be triggered by certain key combinations at the end of the input line)

Changed paths:
    engines/kyra/gui/gui_lok.cpp


diff --git a/engines/kyra/gui/gui_lok.cpp b/engines/kyra/gui/gui_lok.cpp
index 28846541334..4dd2680a720 100644
--- a/engines/kyra/gui/gui_lok.cpp
+++ b/engines/kyra/gui/gui_lok.cpp
@@ -764,9 +764,11 @@ void GUI_LoK::updateSavegameString() {
 					_backupChars[_inputState++] = prevTwoByteChar;
 				}
 				// A new character will only be added if there is still space left.
-				if (newTwoByteChar && (length < ARRAYSIZE(_savegameName) - 2) && (width <= 250)) {
-					WRITE_BE_UINT16(&_savegameName[length], newTwoByteChar);
-					_savegameName[length + 2] = 0;
+				if (newTwoByteChar) {
+					if ((length < ARRAYSIZE(_savegameName) - 2) && (width <= 250)) {
+						WRITE_BE_UINT16(&_savegameName[length], newTwoByteChar);
+						_savegameName[length + 2] = 0;
+					}
 					_backupChars[0] = newTwoByteChar;
 					_inputState = 1;
 				}




More information about the Scummvm-git-logs mailing list