aboutsummaryrefslogtreecommitdiff
path: root/infcodes.c
diff options
context:
space:
mode:
Diffstat (limited to 'infcodes.c')
-rw-r--r--infcodes.c12
1 files changed, 3 insertions, 9 deletions
diff --git a/infcodes.c b/infcodes.c
index d4e5ee9..9abe541 100644
--- a/infcodes.c
+++ b/infcodes.c
@@ -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