Skip to content

Commit

Permalink
report error code after finish decompression
Browse files Browse the repository at this point in the history
  • Loading branch information
ruanjue committed Dec 4, 2018
1 parent 4a15f07 commit cc023dc
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions pgzf.c
Original file line number Diff line number Diff line change
Expand Up @@ -160,6 +160,10 @@ int main(int argc, char **argv){
while((nbyte = read_pgzf(pz, buff, bufsize))){
fwrite(buff, 1, nbyte, out);
}
if(pz->error){
fprintf(stderr, " ** ERROR: error code (%d)'\n", pz->error);
return 1;
}
close_pgzf(pz);
if(in != stdin){
fclose(in);
Expand Down

0 comments on commit cc023dc

Please sign in to comment.