diff options
Diffstat (limited to 'zlib/inflate.c')
-rw-r--r-- | zlib/inflate.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/zlib/inflate.c b/zlib/inflate.c index 32e9b8de6..f177186dd 100644 --- a/zlib/inflate.c +++ b/zlib/inflate.c @@ -144,8 +144,8 @@ int stream_size; } -#define NEEDBYTE {if(z->avail_in==0)return r;r=f;} -#define NEXTBYTE (z->avail_in--,z->total_in++,*z->next_in++) +#define NEEDBYTE {if(z->avail_in==0)goto out_NEEDBYTE;r=f;} +#define NEXTBYTE (z->avail_in--,/*z->total_in++,*/ *z->next_in++) int ZEXPORT inflate(z, f) z_streamp z; @@ -153,9 +153,10 @@ int f; { int r; uInt b; - +#if 0 if (z == Z_NULL || z->state == Z_NULL || z->next_in == Z_NULL) return Z_STREAM_ERROR; +#endif f = f == Z_FINISH ? Z_BUF_ERROR : Z_OK; r = Z_BUF_ERROR; while (1) switch (z->state->mode) @@ -272,6 +273,9 @@ int f; #ifdef NEED_DUMMY_RETURN return Z_STREAM_ERROR; /* Some dumb compilers complain without this */ #endif + +out_NEEDBYTE: + return r; } |