diff options
Diffstat (limited to 'inflate.c')
-rw-r--r-- | inflate.c | 5 |
1 files changed, 3 insertions, 2 deletions
@@ -1506,9 +1506,10 @@ z_streamp strm; | |||
1506 | { | 1506 | { |
1507 | struct inflate_state FAR *state; | 1507 | struct inflate_state FAR *state; |
1508 | 1508 | ||
1509 | if (strm == Z_NULL || strm->state == Z_NULL) return -1L << 16; | 1509 | if (strm == Z_NULL || strm->state == Z_NULL) |
1510 | return (long)(((unsigned long)0 - 1) << 16); | ||
1510 | state = (struct inflate_state FAR *)strm->state; | 1511 | state = (struct inflate_state FAR *)strm->state; |
1511 | return ((long)(state->back) << 16) + | 1512 | return (long)(((unsigned long)((long)state->back)) << 16) + |
1512 | (state->mode == COPY ? state->length : | 1513 | (state->mode == COPY ? state->length : |
1513 | (state->mode == MATCH ? state->was - state->length : 0)); | 1514 | (state->mode == MATCH ? state->was - state->length : 0)); |
1514 | } | 1515 | } |