[Scummvm-cvs-logs] CVS: scummvm/simon simon.cpp,1.428,1.429

Oliver Kiehl olki at users.sourceforge.net
Sun Mar 14 18:33:43 CET 2004


Update of /cvsroot/scummvm/scummvm/simon
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv6380

Modified Files:
	simon.cpp 
Log Message:
Hack to prevent segfaults caused by insufficient allocated memory when
playing the french version of simon2 with subtitles enabled.


Index: simon.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/simon/simon.cpp,v
retrieving revision 1.428
retrieving revision 1.429
diff -u -d -r1.428 -r1.429
--- simon.cpp	14 Mar 2004 23:47:15 -0000	1.428
+++ simon.cpp	15 Mar 2004 01:12:50 -0000	1.429
@@ -4342,6 +4342,13 @@
 		uint32 size = _game_offsets_ptr[id + 1] - offs_a;
 		byte *dst;
 
+		// !!! HACK !!!
+		// allocate more space for text to cope with foreign languages that use
+		// up more space than english. I hope 6400 bytes are enough. This number
+		// is base on: 2 (lines) * 320 (screen width) * 10 (textheight) -- olki
+		if (id == 5)
+			size += 6400;
+
 		dst = setup_vga_destination(size);
 		resfile_read(dst, offs_a, size);
 





More information about the Scummvm-git-logs mailing list