From e457a3f2513529930d16636155243dfc125035bd Mon Sep 17 00:00:00 2001 From: Travis Howell Date: Tue, 14 Jul 2009 12:34:42 +0000 Subject: Add workaround for bug #1538873 - SIMON1 (French): Text wrongly displayed. svn-id: r42474 --- engines/agos/string.cpp | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'engines') diff --git a/engines/agos/string.cpp b/engines/agos/string.cpp index a466be796f..23dc24cf33 100644 --- a/engines/agos/string.cpp +++ b/engines/agos/string.cpp @@ -136,6 +136,18 @@ const byte *AGOSEngine::getStringPtrByID(uint16 stringId, bool upperCase) { strcpy((char *)dst, (const char *)stringPtr); } + // WORKAROUND bug #1538873: The French version used excess spaces, + // at the end of many messages, so we strip off those excess spaces. + if (getGameType() == GType_SIMON1 && _language == Common::FR_FRA) { + 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); -- cgit v1.2.3