[Scummvm-git-logs] scummvm master -> 43b0e798641985097756a30e02f35e70f24da239
sdelamarre
noreply at scummvm.org
Sat Oct 7 22:01:14 UTC 2023
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:
43b0e79864 GOB: Fix a long standing bug in "cleanupStr"
Commit: 43b0e798641985097756a30e02f35e70f24da239
https://github.com/scummvm/scummvm/commit/43b0e798641985097756a30e02f35e70f24da239
Author: Simon Delamarre (simon.delamarre14 at gmail.com)
Date: 2023-10-07T23:59:41+02:00
Commit Message:
GOB: Fix a long standing bug in "cleanupStr"
Because of bug introduced in 2009, the cleaned-up string was emptied
instead of being just normalized - a bit radical !
Known to fix the following easter egg in Adibou2: when creating a
character with a name from the Coktel team (e.g. "Cathy"), the birth
date is automatically filled with the real world value.
Changed paths:
engines/gob/util.cpp
diff --git a/engines/gob/util.cpp b/engines/gob/util.cpp
index 65e305affb6..50466fbe285 100644
--- a/engines/gob/util.cpp
+++ b/engines/gob/util.cpp
@@ -538,9 +538,9 @@ void Util::cleanupStr(char *str) {
Common::strcat_s(buf, trStr2);
Common::strcat_s(buf, trStr3);
- // Translating "wrong" characters
+ // Translating "wrong" characters (removing diacritics, converting to lower case)
for (size_t i = 0; i < strlen(str); i++)
- str[i] = buf[MIN<int>(str[i] - 32, 32)];
+ str[i] = buf[MAX<int>(str[i] - 32, 32)];
// Trim spaces left
while (str[0] == ' ')
More information about the Scummvm-git-logs
mailing list