mirror of
https://github.com/libretro/scummvm.git
synced 2025-02-19 10:41:55 +00:00
TRECISION: Revert, change the way _compBuffer is allocated
This commit is contained in:
parent
1df6a9b138
commit
fa55ae2fc6
@ -68,7 +68,7 @@ bool FastFile::open(const Common::String &name) {
|
|||||||
void FastFile::close() {
|
void FastFile::close() {
|
||||||
delete _stream;
|
delete _stream;
|
||||||
_stream = nullptr;
|
_stream = nullptr;
|
||||||
delete[] _compStream;
|
delete _compStream;
|
||||||
_compStream = nullptr;
|
_compStream = nullptr;
|
||||||
_fileEntries.clear();
|
_fileEntries.clear();
|
||||||
}
|
}
|
||||||
@ -159,8 +159,8 @@ Common::SeekableReadStream *FastFile::createReadStreamForCompressedMember(const
|
|||||||
uint8 *ibuf = new uint8[dataSize];
|
uint8 *ibuf = new uint8[dataSize];
|
||||||
const int32 realSize = MAX(dataSize, decompSize) + 8 + 100; // add extra padding for the decompressor
|
const int32 realSize = MAX(dataSize, decompSize) + 8 + 100; // add extra padding for the decompressor
|
||||||
|
|
||||||
delete[] _compStream;
|
delete _compStream;
|
||||||
_compBuffer = new uint8[realSize];
|
_compBuffer = (uint8 *) malloc (realSize);
|
||||||
|
|
||||||
ff->read(ibuf, dataSize);
|
ff->read(ibuf, dataSize);
|
||||||
delete ff;
|
delete ff;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user