Fix stupid potentially-crashy bug.

This commit is contained in:
Shpoike 2024-01-25 10:47:13 +00:00
parent dae5b66365
commit 03e5fe3954

View file

@ -805,7 +805,7 @@ FILE *FSZIP_Deflate(FILE *src, qofs_t srcsize, qofs_t outsize, const char *entry
return NULL;
}
}
fwrite(outbuffer, 1, strm.total_out, of);
fwrite(outbuffer, 1, strm.next_out - outbuffer, of);
inflateEnd(&strm);
fclose(src);