From 715f105e6e59b451812b73f758fbc874be681207 Mon Sep 17 00:00:00 2001 From: Michael Kaiser Date: Sat, 26 Mar 2011 15:06:56 +0100 Subject: Set the result pointer after swapping buffers. In the CCITTFaxDecode filter, the result pointer was reset before swapping the buffers, so each line was copied to the output buffer only after decoding the following line. This was leading to a duplication of the first line and a missing last line. --- fitz/filt_faxd.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'fitz/filt_faxd.c') diff --git a/fitz/filt_faxd.c b/fitz/filt_faxd.c index 5da826ae..714629e7 100644 --- a/fitz/filt_faxd.c +++ b/fitz/filt_faxd.c @@ -625,14 +625,15 @@ eol: if (fax->rp < fax->wp) return p - buf; - fax->rp = fax->dst; - fax->wp = fax->dst + fax->stride; tmp = fax->ref; fax->ref = fax->dst; fax->dst = tmp; memset(fax->dst, 0, fax->stride); + fax->rp = fax->dst; + fax->wp = fax->dst + fax->stride; + fax->stage = SNORMAL; fax->c = 0; fax->a = -1; -- cgit v1.2.3