mirror of
https://github.com/minetest/minetestmapper.git
synced 2025-07-05 10:00:20 +02:00
Fix broken buffer handling in ZlibDecompressor
40a5e16e21
added the broken reserve() call and only by chance did0a56b18cfb
not break it further because I forgot to remove the unconditional resize(). I should read my own code changes more often.
This commit is contained in:
@ -29,7 +29,8 @@ void ZstdDecompressor::decompress(ustring &buffer)
|
||||
// output space is extended in chunks of this size
|
||||
constexpr size_t BUFSIZE = 8 * 1024;
|
||||
|
||||
buffer.resize(BUFSIZE);
|
||||
if (buffer.empty())
|
||||
buffer.resize(BUFSIZE);
|
||||
ZSTD_outBuffer outbuf = { &buffer[0], buffer.size(), 0 };
|
||||
|
||||
ZSTD_initDStream(stream);
|
||||
|
Reference in New Issue
Block a user