aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOliver Kiehl2004-03-15 01:12:50 +0000
committerOliver Kiehl2004-03-15 01:12:50 +0000
commit54b9b1ccc71ed3e8de250c8fed942c1d95acc102 (patch)
tree37ea1bf2d65d7cc3cf4b78d0ac8c63d5394c34cd
parentf8610cd1c5fca478ae50e473b175f4cb33ad563a (diff)
downloadscummvm-rg350-54b9b1ccc71ed3e8de250c8fed942c1d95acc102.tar.gz
scummvm-rg350-54b9b1ccc71ed3e8de250c8fed942c1d95acc102.tar.bz2
scummvm-rg350-54b9b1ccc71ed3e8de250c8fed942c1d95acc102.zip
Hack to prevent segfaults caused by insufficient allocated memory when
playing the french version of simon2 with subtitles enabled. svn-id: r13287
-rw-r--r--simon/simon.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/simon/simon.cpp b/simon/simon.cpp
index 506cff8eb9..04bd9b8c10 100644
--- a/simon/simon.cpp
+++ b/simon/simon.cpp
@@ -4342,6 +4342,13 @@ byte *SimonEngine::read_vga_from_datfile_2(uint id) {
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);