From 6db23fa056dd2bebb2821ac0f130f1141a9c48a0 Mon Sep 17 00:00:00 2001 From: Travis Howell Date: Thu, 7 Jun 2007 04:08:55 +0000 Subject: Fix invalid writes in the Amiga demo of Elvira 1, caused by video window 20 using larger height. svn-id: r27162 --- engines/agos/agos.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/engines/agos/agos.cpp b/engines/agos/agos.cpp index afd120354c..fd8de533b0 100644 --- a/engines/agos/agos.cpp +++ b/engines/agos/agos.cpp @@ -618,7 +618,11 @@ int AGOSEngine::init() { } else if (getGameType() == GType_WW || getGameType() == GType_ELVIRA2) { _window4BackScn = (byte *)calloc(224 * 127, 1); } else if (getGameType() == GType_ELVIRA1) { - _window4BackScn = (byte *)calloc(224 * 144, 1); + if (getPlatform() == Common::kPlatformAmiga && (getFeatures() & GF_DEMO)) { + _window4BackScn = (byte *)calloc(224 * 196, 1); + } else { + _window4BackScn = (byte *)calloc(224 * 144, 1); + } _window6BackScn = (byte *)calloc(48 * 80, 1); } -- cgit v1.2.3