aboutsummaryrefslogtreecommitdiff
path: root/common/macresman.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'common/macresman.cpp')
-rw-r--r--common/macresman.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/common/macresman.cpp b/common/macresman.cpp
index f2f020c6de..00562f746a 100644
--- a/common/macresman.cpp
+++ b/common/macresman.cpp
@@ -360,8 +360,8 @@ bool MacResManager::load(SeekableReadStream &stream) {
_mapLength = stream.readUint32BE();
// do sanity check
- if (_dataOffset >= (uint32)stream.size() || _mapOffset >= (uint32)stream.size() ||
- _dataLength + _mapLength > (uint32)stream.size()) {
+ if (stream.eos() || _dataOffset >= (uint32)stream.size() || _mapOffset >= (uint32)stream.size() ||
+ _dataLength + _mapLength > (uint32)stream.size()) {
_resForkOffset = -1;
_mode = kResForkNone;
return false;