Fix bug in ZIP file extraction breaking the Mega Drops homebrew, and others.
Was rounding file sizes up to the nearest 128k...
This commit is contained in:
parent
cc4e7c4b10
commit
3924d8bdea
1 changed files with 1 additions and 1 deletions
|
@ -242,7 +242,7 @@ bool GameManager::InstallGame(std::string zipfile, bool deleteAfter) {
|
|||
const size_t blockSize = 1024 * 128;
|
||||
u8 *buffer = new u8[blockSize];
|
||||
while (pos < size) {
|
||||
size_t bs = std::min(blockSize, pos - size);
|
||||
size_t bs = std::min(blockSize, size - pos);
|
||||
zip_fread(zf, buffer, bs);
|
||||
size_t written = fwrite(buffer, 1, bs, f);
|
||||
if (written != bs) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue