From 54b9b1ccc71ed3e8de250c8fed942c1d95acc102 Mon Sep 17 00:00:00 2001 From: Oliver Kiehl Date: Mon, 15 Mar 2004 01:12:50 +0000 Subject: Hack to prevent segfaults caused by insufficient allocated memory when playing the french version of simon2 with subtitles enabled. svn-id: r13287 --- simon/simon.cpp | 7 +++++++ 1 file changed, 7 insertions(+) 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); -- cgit v1.2.3