Hack to prevent segfaults caused by insufficient allocated memory when

playing the french version of simon2 with subtitles enabled.

svn-id: r13287
This commit is contained in:
Oliver Kiehl 2004-03-15 01:12:50 +00:00
parent f8610cd1c5
commit 54b9b1ccc7

View File

@ -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);