From 6b405587f22fdd3743a12f45ec89e955d1e076b7 Mon Sep 17 00:00:00 2001 From: Jonathan Gray Date: Fri, 15 Aug 2003 05:35:12 +0000 Subject: add hack for string resource idx numbers greater than max for humongous games svn-id: r9698 --- scumm/resource.cpp | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'scumm') 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) { -- cgit v1.2.3