diff options
Diffstat (limited to 'engines/agos/string.cpp')
-rw-r--r-- | engines/agos/string.cpp | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/engines/agos/string.cpp b/engines/agos/string.cpp index a466be796f..3773b1fa10 100644 --- a/engines/agos/string.cpp +++ b/engines/agos/string.cpp @@ -136,6 +136,20 @@ const byte *AGOSEngine::getStringPtrByID(uint16 stringId, bool upperCase) { strcpy((char *)dst, (const char *)stringPtr); } + // WORKAROUND bug #1538873: The French version of Simon 1 and the + // Polish version of Simon 2 used excess spaces, at the end of many + // messages, so we strip off those excess spaces. + if ((getGameType() == GType_SIMON1 && _language == Common::FR_FRA) || + (getGameType() == GType_SIMON2 && _language == Common::PL_POL)) { + uint16 len = strlen((const char *)dst) - 1; + + while (len && dst[len] == 32) { + dst[len] = 0; + len--; + } + + } + if (upperCase && *dst) { if (islower(*dst)) *dst = toupper(*dst); |