diff --git a/engines/gob/resources.cpp b/engines/gob/resources.cpp index ac2deadd5f0..dbed825977d 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)