diff options
author | lukaslw | 2014-10-06 22:54:24 +0200 |
---|---|---|
committer | lukaslw | 2014-10-06 22:54:24 +0200 |
commit | 4ef22e3a196705097cb4ffd4992d1666e4519537 (patch) | |
tree | eadb7cfe16ffb338a0e5d3ff18d203524d2838be | |
parent | a9d9696d217f43732e3594f5f862c4a8b97b9328 (diff) | |
download | scummvm-rg350-4ef22e3a196705097cb4ffd4992d1666e4519537.tar.gz scummvm-rg350-4ef22e3a196705097cb4ffd4992d1666e4519537.tar.bz2 scummvm-rg350-4ef22e3a196705097cb4ffd4992d1666e4519537.zip |
PRINCE: PtcArchive::createReadStreamFromMember - add MKTAG
-rw-r--r-- | engines/prince/archive.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/engines/prince/archive.cpp b/engines/prince/archive.cpp index 11be0b224a..28f77cb4c4 100644 --- a/engines/prince/archive.cpp +++ b/engines/prince/archive.cpp @@ -123,13 +123,13 @@ Common::SeekableReadStream *PtcArchive::createReadStreamForMember(const Common:: _stream->seek(entryHeader._offset); // This *HAS* to be malloc (not new[]) because MemoryReadStream uses free() to free the memory - byte* buffer = (byte *)malloc(size); + byte *buffer = (byte *)malloc(size); _stream->read(buffer, size); - if (READ_BE_UINT32(buffer) == 0x4D41534D) { + if (READ_BE_UINT32(buffer) == MKTAG('M', 'A', 'S', 'M')) { Decompressor dec; uint32 decompLen = READ_BE_UINT32(buffer + 14); - byte *decompData = (byte*)malloc(decompLen); + byte *decompData = (byte *)malloc(decompLen); dec.decompress(buffer + 18, decompData, decompLen); free(buffer); size = decompLen; |