diff options
Diffstat (limited to 'engines/gob/script.cpp')
-rw-r--r-- | engines/gob/script.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/engines/gob/script.cpp b/engines/gob/script.cpp index d4409b0a4e..6162e943bf 100644 --- a/engines/gob/script.cpp +++ b/engines/gob/script.cpp @@ -353,7 +353,10 @@ bool Script::loadTOT(const Common::String &fileName) { if (!stream) return false; - _totSize = stream->size(); + if (!totFile.getProperties(_totProperties)) + return false; + + _totSize = _totProperties.scriptEnd; if (_totSize <= 0) return false; @@ -361,9 +364,6 @@ bool Script::loadTOT(const Common::String &fileName) { if (stream->read(_totData, _totSize) != _totSize) return false; - if (!totFile.getProperties(_totProperties)) - return false; - return true; } |