diff options
author | Sven Hesse | 2014-03-16 16:40:08 +0100 |
---|---|---|
committer | Sven Hesse | 2014-03-16 16:40:08 +0100 |
commit | dba4084c8abc4f49cce01d08216187f0138a0503 (patch) | |
tree | 5640d74ec5513c87ac98d8c594c0e0453704ac33 /engines/gob | |
parent | 0f9b1364cf0f4e15abd4c11519f4cbbcda44789f (diff) | |
download | scummvm-rg350-dba4084c8abc4f49cce01d08216187f0138a0503.tar.gz scummvm-rg350-dba4084c8abc4f49cce01d08216187f0138a0503.tar.bz2 scummvm-rg350-dba4084c8abc4f49cce01d08216187f0138a0503.zip |
GOB: Calculate _totResStart even if no resources follow
It's also used as a base offset for TOT strings.
This fixes a crash in the Amiga version of Bargon Attack.
Diffstat (limited to 'engines/gob')
-rw-r--r-- | engines/gob/resources.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/engines/gob/resources.cpp b/engines/gob/resources.cpp index ac2deadd5f..dbed825977 100644 --- a/engines/gob/resources.cpp +++ b/engines/gob/resources.cpp @@ -209,6 +209,7 @@ void Resources::unload(bool del) { _totResourceTable = 0; _extResourceTable = 0; _totTextTable = 0; + _totResStart = 0; _totData = 0; _totSize = 0; _imData = 0; @@ -233,6 +234,8 @@ bool Resources::loadTOTResourceTable() { if (!stream) return false; + _totResStart = totProps.scriptEnd; + if ((totProps.resourcesOffset == 0xFFFFFFFF) || (totProps.resourcesOffset == 0)) // No resources here @@ -271,7 +274,6 @@ bool Resources::loadTOTResourceTable() { item.type = kResourceTOT; } - _totResStart = totProps.scriptEnd; _totSize = stream->size() - _totResStart; if (_totSize <= 0) |