# HG changeset patch # User Matti Hamalainen # Date 1582630832 -7200 # Node ID f81b42dd600dd4c694ed27b7a346f21bb33d5d74 # Parent 0b18f597351a1a0de015abbc391de89afadb06ad Adjust few comments. diff -r 0b18f597351a -r f81b42dd600d tools/packed.c --- a/tools/packed.c Tue Feb 25 09:40:23 2020 +0200 +++ b/tools/packed.c Tue Feb 25 13:40:32 2020 +0200 @@ -349,6 +349,8 @@ if (compress) { int zret; + + // Initialize compression streams memset(&zstr, 0, sizeof(zstr)); if (deflateInit(&zstr, level) != Z_OK) { @@ -357,7 +359,6 @@ } zinit = TRUE; - // Initialize compression streams zret = Z_OK; while (!feof(inFile) && zret == Z_OK) { @@ -466,6 +467,7 @@ // Read and uncompress the data, if needed if (decompress || (entry->flags & DMF_COMPRESSED) == 0) { + // Initialize compression streams memset(&zstr, 0, sizeof(zstr)); if (inflateInit(&zstr) != Z_OK) { @@ -475,7 +477,6 @@ zinit = TRUE; } - // Initialize compression streams remaining = entry->length; zret = Z_OK; while (remaining > 0 && zret == Z_OK)