mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-03-02 22:14:12 +00:00
DiscIO: Fix decompressing writing too much sometimes
This issue cannot happen with good dumps due to their size, but it can happen with trimmed dumps.
This commit is contained in:
parent
26b21e3186
commit
3aa463cdae
@ -371,7 +371,7 @@ bool DecompressBlobToFile(const std::string& infile_path, const std::string& out
|
||||
const CompressedBlobHeader& header = reader->GetHeader();
|
||||
static const size_t BUFFER_BLOCKS = 32;
|
||||
size_t buffer_size = header.block_size * BUFFER_BLOCKS;
|
||||
size_t last_buffer_size = header.block_size * (header.num_blocks % BUFFER_BLOCKS);
|
||||
size_t last_buffer_size = header.data_size % buffer_size;
|
||||
if (last_buffer_size == 0)
|
||||
last_buffer_size = buffer_size;
|
||||
std::vector<u8> buffer(buffer_size);
|
||||
|
Loading…
x
Reference in New Issue
Block a user