aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthew Hoops2010-05-10 00:50:37 +0000
committerMatthew Hoops2010-05-10 00:50:37 +0000
commitcdf30ecc5acf689a44156b7afdab7571d519d220 (patch)
treee02f742e722c519b0d1e99b5d0010bdb5ffe26e8
parent00788185497e3b5a58da8cec5068585a0becd932 (diff)
downloadscummvm-rg350-cdf30ecc5acf689a44156b7afdab7571d519d220.tar.gz
scummvm-rg350-cdf30ecc5acf689a44156b7afdab7571d519d220.tar.bz2
scummvm-rg350-cdf30ecc5acf689a44156b7afdab7571d519d220.zip
Minor fix for using the MacResManager with a regular file; switch MacBinary's data fork to using a SeekableSubReadStream instead of a MemoryReadStream.
svn-id: r48995
-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();