diff options
Diffstat (limited to 'stream/filt_lzwd.c')
-rw-r--r-- | stream/filt_lzwd.c | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/stream/filt_lzwd.c b/stream/filt_lzwd.c index 127ebde8..8e90a74e 100644 --- a/stream/filt_lzwd.c +++ b/stream/filt_lzwd.c @@ -176,15 +176,18 @@ fz_processlzwd(fz_filter *filter, fz_buffer *in, fz_buffer *out) return fz_iodone; } + eatbits(lzw, oldcodebits + MINBITS); + + lzw->oldcode = lzw->code; + if (out->wp + 1 > out->ep) + { + lzw->resume = 1; return fz_ioneedout; + } *out->wp++ = lzw->code; - lzw->oldcode = lzw->code; - - eatbits(lzw, oldcodebits + MINBITS); - continue; } |