aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJason A. Donenfeld <Jason@zx2c4.com>2011-05-21 04:39:09 -0400
committerJason A. Donenfeld <Jason@zx2c4.com>2011-05-21 04:39:09 -0400
commitdf7b5131423d538f15311159a1f304bf81a18c3e (patch)
tree1a811464e0f8b4bcc0bea0ab728e8d492cbef581
parentAdd makefile and gitignore file. (diff)
downloadBruteZip-df7b5131423d538f15311159a1f304bf81a18c3e.tar.xz
BruteZip-df7b5131423d538f15311159a1f304bf81a18c3e.zip
Always seek to bottom.
-rw-r--r--read.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/read.c b/read.c
index e276ed4..1611a10 100644
--- a/read.c
+++ b/read.c
@@ -113,7 +113,6 @@ int main(int argc, char *argv[])
strm.next_out = zbuffer;
if ((ret = inflate(&strm, Z_NO_FLUSH)) != Z_OK && ret != Z_STREAM_END && ret != Z_BUF_ERROR) {
printf("Inflation failed, error %i.\n", ret);
- fseek(fh, startloc + header.compressedsize, SEEK_SET);
break;
}
len = sizeof(zbuffer) - strm.avail_out;
@@ -121,6 +120,7 @@ int main(int argc, char *argv[])
} while (strm.avail_out == 0);
} else
fwrite(buffer, 1, len, ofh);
+ fseek(fh, startloc + header.compressedsize, SEEK_SET);
}
if (header.compression == 8)
inflateEnd(&strm);