aboutsummaryrefslogtreecommitdiff
path: root/engines/gob/resources.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'engines/gob/resources.cpp')
-rw-r--r--engines/gob/resources.cpp8
1 files changed, 5 insertions, 3 deletions
diff --git a/engines/gob/resources.cpp b/engines/gob/resources.cpp
index a84f4ac4b8..dbed825977 100644
--- a/engines/gob/resources.cpp
+++ b/engines/gob/resources.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
@@ -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)