aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--common/macresman.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/common/macresman.cpp b/common/macresman.cpp
index d58bfcd81f..24099475a7 100644
--- a/common/macresman.cpp
+++ b/common/macresman.cpp
@@ -108,6 +108,7 @@ bool MacResManager::open(Common::String filename) {
// Fine, what about just the data fork?
if (file->open(filename)) {
_baseFileName = filename;
+ _stream = file;
return true;
}
@@ -218,8 +219,7 @@ Common::SeekableReadStream *MacResManager::getDataFork() {
if (_mode == kResForkMacBinary) {
_stream->seek(MBI_DFLEN);
uint32 dataSize = _stream->readUint32BE();
- _stream->seek(MBI_INFOHDR);
- return _stream->readStream(dataSize);
+ return new SeekableSubReadStream(_stream, MBI_INFOHDR, MBI_INFOHDR + dataSize);
}
Common::File *file = new Common::File();