aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTravis Howell2007-06-07 04:08:55 +0000
committerTravis Howell2007-06-07 04:08:55 +0000
commit6db23fa056dd2bebb2821ac0f130f1141a9c48a0 (patch)
tree99a49eeaeaa5998765d64158f0fb8ca75ec85858
parenta18357580ba33029251ad96bf2d3fea775ca22ed (diff)
downloadscummvm-rg350-6db23fa056dd2bebb2821ac0f130f1141a9c48a0.tar.gz
scummvm-rg350-6db23fa056dd2bebb2821ac0f130f1141a9c48a0.tar.bz2
scummvm-rg350-6db23fa056dd2bebb2821ac0f130f1141a9c48a0.zip
Fix invalid writes in the Amiga demo of Elvira 1, caused by video window 20 using larger height.
svn-id: r27162
-rw-r--r--engines/agos/agos.cpp6
1 files changed, 5 insertions, 1 deletions
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);
}