diff options
author | Arnaud Boutonné | 2010-03-17 20:29:26 +0000 |
---|---|---|
committer | Arnaud Boutonné | 2010-03-17 20:29:26 +0000 |
commit | 80a81111938088f6730a5abfd03e6004f0c807bf (patch) | |
tree | af192d9ad66cd96238428262744751b21472bafb /engines | |
parent | 072e3806f1ec1668cac662e4dac81f4d8493cb0d (diff) | |
download | scummvm-rg350-80a81111938088f6730a5abfd03e6004f0c807bf.tar.gz scummvm-rg350-80a81111938088f6730a5abfd03e6004f0c807bf.tar.bz2 scummvm-rg350-80a81111938088f6730a5abfd03e6004f0c807bf.zip |
Use resSize instead of computing its value again.
svn-id: r48274
Diffstat (limited to 'engines')
-rw-r--r-- | engines/gob/resources.cpp | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/engines/gob/resources.cpp b/engines/gob/resources.cpp index 1dae2016d6..8241821039 100644 --- a/engines/gob/resources.cpp +++ b/engines/gob/resources.cpp @@ -246,13 +246,12 @@ bool Resources::loadTOTResourceTable() { stream->seek(totProps.resourcesOffset); _totResourceTable->itemsCount = stream->readSint16LE(); - _totResourceTable->dataOffset = totProps.resourcesOffset + kTOTResTableSize + - _totResourceTable->itemsCount * kTOTResItemSize; - - uint32 resSize = _totResourceTable->itemsCount * kTOTResItemSize + kTOTResTableSize; + _totResourceTable->dataOffset = totProps.resourcesOffset + resSize; + + // Would the table actually fit into the TOT? if ((totProps.resourcesOffset + resSize) > ((uint32) stream->size())) return false; |