C client: Fix technically invalid .png and .cw files being generated.

'last block' flag was incorrectly unset, which tripped up some software.
This commit is contained in:
UnknownShadow200 2018-09-12 09:32:22 +10:00
parent 3d3da73cc1
commit 1aa7c57a62

View File

@ -741,7 +741,7 @@ static void Deflate_LenDist(struct DeflateState* state, Int32 len, Int32 dist) {
static ReturnCode Deflate_FlushBlock(struct DeflateState* state, Int32 len) { static ReturnCode Deflate_FlushBlock(struct DeflateState* state, Int32 len) {
if (!state->WroteHeader) { if (!state->WroteHeader) {
state->WroteHeader = true; state->WroteHeader = true;
Deflate_PushBits(state, 2, 3); /* final block TRUE, block type FIXED */ Deflate_PushBits(state, 3, 3); /* final block TRUE, block type FIXED */
} }
/* TODO: Hash chains should persist past one block flush */ /* TODO: Hash chains should persist past one block flush */