aboutsummaryrefslogtreecommitdiff
path: root/scumm/resource.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'scumm/resource.cpp')
-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) {