[Scummvm-git-logs] scummvm master -> 914e017290975614b65d1d44e5d2b31c2b2ab803
athrxx
noreply at scummvm.org
Fri Oct 11 22:38:07 UTC 2024
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:
914e017290 SCI: fix Japanese text input (regression)
Commit: 914e017290975614b65d1d44e5d2b31c2b2ab803
https://github.com/scummvm/scummvm/commit/914e017290975614b65d1d44e5d2b31c2b2ab803
Author: athrxx (athrxx at scummvm.org)
Date: 2024-10-12T00:37:01+02:00
Commit Message:
SCI: fix Japanese text input (regression)
Regression from 10d97ce37947362e6fa7161cd85221f59ca49490
If you try the Japanese text input it is kind of obvious, e. g.
when you type "kyo" which the parser converts to "ãã§" the
cursor should end up to the right of that. Instead it was
reset to 0, due to the wrong strnlen size argument.
Changed paths:
engines/sci/parser/vocabulary.cpp
diff --git a/engines/sci/parser/vocabulary.cpp b/engines/sci/parser/vocabulary.cpp
index 5c64ee5aba2..95367b5dda9 100644
--- a/engines/sci/parser/vocabulary.cpp
+++ b/engines/sci/parser/vocabulary.cpp
@@ -428,7 +428,7 @@ bool Vocabulary::checkAltInput(Common::String &text, uint16 &cursorPos) {
if (cursorPos > p + i->_inputLength) {
cursorPos += Common::strnlen(i->_replacement, maxSize) - i->_inputLength;
} else if (cursorPos > p) {
- cursorPos = p + Common::strnlen(i->_replacement, maxSize);
+ cursorPos = p + Common::strnlen(i->_replacement, text.size());
}
for (uint32 j = 0; j < i->_inputLength; ++j)
More information about the Scummvm-git-logs
mailing list