[Scummvm-cvs-logs] CVS: scummvm/simon simon.cpp,1.251,1.252

Jamieson Christian jamieson630 at users.sourceforge.net
Mon Jul 14 03:03:24 CEST 2003


Update of /cvsroot/scummvm/scummvm/simon
In directory sc8-pr-cvs1:/tmp/cvs-serv29198/scummvm/simon

Modified Files:
	simon.cpp 
Log Message:
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.

Index: simon.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/simon/simon.cpp,v
retrieving revision 1.251
retrieving revision 1.252
diff -u -d -r1.251 -r1.252
--- simon.cpp	14 Jul 2003 09:02:12 -0000	1.251
+++ simon.cpp	14 Jul 2003 10:02:37 -0000	1.252
@@ -4001,7 +4001,7 @@
 		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;





More information about the Scummvm-git-logs mailing list