Permalink
Browse files

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

'last block' flag was incorrectly unset, which tripped up some software.
  • Loading branch information...
UnknownShadow200 committed Sep 11, 2018
1 parent 3d3da73 commit 1aa7c57a62548c6e21231f86998361af60469d18
Showing with 1 addition and 1 deletion.
  1. +1 −1 src/Deflate.c
View
@@ -741,7 +741,7 @@ static void Deflate_LenDist(struct DeflateState* state, Int32 len, Int32 dist) {
static ReturnCode Deflate_FlushBlock(struct DeflateState* state, Int32 len) {
if (!state->WroteHeader) {
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 */

0 comments on commit 1aa7c57

Please sign in to comment.