diff options
Diffstat (limited to 'deflate.c')
-rw-r--r-- | deflate.c | 7 |
1 files changed, 4 insertions, 3 deletions
@@ -447,11 +447,12 @@ int ZEXPORT deflateGetDictionary (strm, dictionary, dictLength) | |||
447 | uInt *dictLength; | 447 | uInt *dictLength; |
448 | { | 448 | { |
449 | deflate_state *s; | 449 | deflate_state *s; |
450 | uInt len; | ||
450 | 451 | ||
451 | if (deflateStateCheck(strm)) | 452 | if (deflateStateCheck(strm)) |
452 | return Z_STREAM_ERROR; | 453 | return Z_STREAM_ERROR; |
453 | s = strm->state; | 454 | s = strm->state; |
454 | uInt len = s->strstart + s->lookahead; | 455 | len = s->strstart + s->lookahead; |
455 | if (len > s->w_size) | 456 | if (len > s->w_size) |
456 | len = s->w_size; | 457 | len = s->w_size; |
457 | if (dictionary != Z_NULL && len) | 458 | if (dictionary != Z_NULL && len) |
@@ -1758,12 +1759,12 @@ local block_state deflate_stored(s, flush) | |||
1758 | * code following this won't be able to either. | 1759 | * code following this won't be able to either. |
1759 | */ | 1760 | */ |
1760 | if (flush != Z_NO_FLUSH && s->strm->avail_in == 0 && | 1761 | if (flush != Z_NO_FLUSH && s->strm->avail_in == 0 && |
1761 | s->strstart == s->block_start) | 1762 | (long)s->strstart == s->block_start) |
1762 | return flush == Z_FINISH ? finish_done : block_done; | 1763 | return flush == Z_FINISH ? finish_done : block_done; |
1763 | 1764 | ||
1764 | /* Fill the window with any remaining input. */ | 1765 | /* Fill the window with any remaining input. */ |
1765 | have = s->window_size - s->strstart - 1; | 1766 | have = s->window_size - s->strstart - 1; |
1766 | if (s->strm->avail_in > have && s->block_start >= s->w_size) { | 1767 | if (s->strm->avail_in > have && s->block_start >= (long)s->w_size) { |
1767 | /* Slide the window down. */ | 1768 | /* Slide the window down. */ |
1768 | s->block_start -= s->w_size; | 1769 | s->block_start -= s->w_size; |
1769 | s->strstart -= s->w_size; | 1770 | s->strstart -= s->w_size; |