diff options
author | Mark Adler <madler@alumni.caltech.edu> | 2011-09-09 23:20:42 -0700 |
---|---|---|
committer | Mark Adler <madler@alumni.caltech.edu> | 2011-09-09 23:20:42 -0700 |
commit | a383133c4e7b93113cee912f213cf9502d785fa7 (patch) | |
tree | bb7c39ab38418fcab817accad1e625b3de0c8237 /infcodes.c | |
parent | 14763ac7c6c03bca62c39e35c03cf5bfc7728802 (diff) | |
download | zlib-a383133c4e7b93113cee912f213cf9502d785fa7.tar.gz zlib-a383133c4e7b93113cee912f213cf9502d785fa7.tar.bz2 zlib-a383133c4e7b93113cee912f213cf9502d785fa7.zip |
zlib 1.1.4v1.1.4
Diffstat (limited to 'infcodes.c')
-rw-r--r-- | infcodes.c | 12 |
1 files changed, 3 insertions, 9 deletions
@@ -1,5 +1,5 @@ | |||
1 | /* infcodes.c -- process literals and length/distance pairs | 1 | /* infcodes.c -- process literals and length/distance pairs |
2 | * Copyright (C) 1995-1998 Mark Adler | 2 | * Copyright (C) 1995-2002 Mark Adler |
3 | * For conditions of distribution and use, see copyright notice in zlib.h | 3 | * For conditions of distribution and use, see copyright notice in zlib.h |
4 | */ | 4 | */ |
5 | 5 | ||
@@ -196,15 +196,9 @@ int r; | |||
196 | Tracevv((stderr, "inflate: distance %u\n", c->sub.copy.dist)); | 196 | Tracevv((stderr, "inflate: distance %u\n", c->sub.copy.dist)); |
197 | c->mode = COPY; | 197 | c->mode = COPY; |
198 | case COPY: /* o: copying bytes in window, waiting for space */ | 198 | case COPY: /* o: copying bytes in window, waiting for space */ |
199 | #ifndef __TURBOC__ /* Turbo C bug for following expression */ | ||
200 | f = (uInt)(q - s->window) < c->sub.copy.dist ? | ||
201 | s->end - (c->sub.copy.dist - (q - s->window)) : | ||
202 | q - c->sub.copy.dist; | ||
203 | #else | ||
204 | f = q - c->sub.copy.dist; | 199 | f = q - c->sub.copy.dist; |
205 | if ((uInt)(q - s->window) < c->sub.copy.dist) | 200 | while (f < s->window) /* modulo window size-"while" instead */ |
206 | f = s->end - (c->sub.copy.dist - (uInt)(q - s->window)); | 201 | f += s->end - s->window; /* of "if" handles invalid distances */ |
207 | #endif | ||
208 | while (c->len) | 202 | while (c->len) |
209 | { | 203 | { |
210 | NEEDOUT | 204 | NEEDOUT |