diff --git a/igzip/igzip_example.c b/igzip/igzip_example.c index 189f0a6..7bf2661 100644 --- a/igzip/igzip_example.c +++ b/igzip/igzip_example.c @@ -64,7 +64,7 @@ int main(int argc, char *argv[]) do { stream.avail_in = (uint32_t) fread(inbuf, 1, BUF_SIZE, in); - stream.end_of_stream = feof(in); + stream.end_of_stream = feof(in) ? 1 : 0; stream.next_in = inbuf; do { stream.avail_out = BUF_SIZE; diff --git a/igzip/igzip_sync_flush_example.c b/igzip/igzip_sync_flush_example.c index 4545317..0351d5c 100644 --- a/igzip/igzip_sync_flush_example.c +++ b/igzip/igzip_sync_flush_example.c @@ -66,7 +66,7 @@ int main(int argc, char *argv[]) do { if (stream.internal_state.state == ZSTATE_NEW_HDR) { stream.avail_in = (uint32_t) fread(inbuf, 1, BUF_SIZE, in); - stream.end_of_stream = feof(in); + stream.end_of_stream = feof(in) ? 1 : 0; stream.next_in = inbuf; } do {