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:
Henrik Rydgard 2016-03-09 17:02:15 +01:00
parent cc4e7c4b10
commit 3924d8bdea

View file

@ -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) {