mirror of
https://github.com/libretro/scummvm.git
synced 2024-12-12 12:09:15 +00:00
Fix for Bug [770838] SIMON1DOS: Fatal crashes with French version
Fix variable underflow for large subtitle strings with no discernable whitespace. This fixes crashes for French subtitles that do, in fact, have whitespace but perhaps not using the same ASCII character that we scan for. Anyway, the text will display, albeit with an extra blank line, and ScummVM no longer blows up. svn-id: r9009
This commit is contained in:
parent
dc9a153e1b
commit
4ae380102a
@ -4001,7 +4001,7 @@ void SimonEngine::talk_with_text(uint num_1, uint num_2, const char *string_ptr,
|
||||
while (strlen(string_ptr) > letters_per_row) {
|
||||
m = letters_per_row;
|
||||
string_ptr_2 += m;
|
||||
while (*string_ptr_2-- != ' ')
|
||||
while (*string_ptr_2-- != ' ' && m)
|
||||
m--;
|
||||
string_ptr_2 += 2;
|
||||
n = (letters_per_row - m + 1) >> 1;
|
||||
|
Loading…
Reference in New Issue
Block a user