aboutsummaryrefslogtreecommitdiff
path: root/scumm
diff options
context:
space:
mode:
authorJonathan Gray2003-08-15 05:35:12 +0000
committerJonathan Gray2003-08-15 05:35:12 +0000
commit6b405587f22fdd3743a12f45ec89e955d1e076b7 (patch)
tree9de69c7677b2454c61d39ac3eecb8b44f111af93 /scumm
parentf76980af395bb0b065b6f364bb0bae66c9f50abf (diff)
downloadscummvm-rg350-6b405587f22fdd3743a12f45ec89e955d1e076b7.tar.gz
scummvm-rg350-6b405587f22fdd3743a12f45ec89e955d1e076b7.tar.bz2
scummvm-rg350-6b405587f22fdd3743a12f45ec89e955d1e076b7.zip
add hack for string resource idx numbers greater than max for humongous games
svn-id: r9698
Diffstat (limited to 'scumm')
-rw-r--r--scumm/resource.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/scumm/resource.cpp b/scumm/resource.cpp
index f6f1f48e0a..0cc3918389 100644
--- a/scumm/resource.cpp
+++ b/scumm/resource.cpp
@@ -1644,6 +1644,13 @@ void Scumm::nukeResource(int type, int idx) {
if (!res.address[type])
return;
+ // FIXME hack around insanely high string resource idx's
+ if ((_features & GF_HUMONGOUS) && (type == 7 && idx > res.num[7])) {
+ warning("nukeResource: type %d index %d > max %d", type, idx,
+ res.num[7]);
+ return;
+ }
+
assert(idx >= 0 && idx < res.num[type]);
if ((ptr = res.address[type][idx]) != NULL) {