Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion gzread.c
Original file line number Diff line number Diff line change
Expand Up @@ -446,7 +446,8 @@ int ZEXPORT gzungetc(int c, gzFile file) {

/* in case this was just opened, set up the input buffer */
if (state->mode == GZ_READ && state->how == LOOK && state->x.have == 0)
(void)gz_look(state);
if (gz_look(state) == -1)
return -1;

/* check that we're reading and that there's no (serious) error */
if (state->mode != GZ_READ ||
Expand Down