summaryrefslogtreecommitdiffstats
path: root/src/file_gz.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/file_gz.c')
-rw-r--r--src/file_gz.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/file_gz.c b/src/file_gz.c
index d50b633..1b97079 100644
--- a/src/file_gz.c
+++ b/src/file_gz.c
@@ -109,15 +109,17 @@ static int header_check_gz(const unsigned char *buffer, const unsigned int buffe
}
if((flags&GZ_FNAME)!=0)
{
- while(off<buffer_size && buffer[off++]!='\0')
+ for(; off<buffer_size && buffer[off]!='\0'; off++)
{
}
+ off++;
}
if((flags&GZ_FCOMMENT)!=0)
{
- while(off<buffer_size && buffer[off++]!='\0')
+ for(; off<buffer_size && buffer[off]!='\0'; off++)
{
}
+ off++;
}
if((flags&GZ_FHCRC)!=0)
{