From fb59e97f2a6361ba0ddde3fe4f6765bef075a55d Mon Sep 17 00:00:00 2001 From: Tor Andersson Date: Wed, 7 Feb 2018 17:48:45 +0100 Subject: Fix silly mistake in fz_output buffering. fz_write_byte forgot to write the byte after needing to flush the buffer. --- source/fitz/output.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) (limited to 'source') diff --git a/source/fitz/output.c b/source/fitz/output.c index 6f4b0b84..74f32344 100644 --- a/source/fitz/output.c +++ b/source/fitz/output.c @@ -381,15 +381,12 @@ fz_write_byte(fz_context *ctx, fz_output *out, unsigned char x) { if (out->bp) { - if (out->wp < out->ep) - { - *out->wp++ = x; - } - else + if (out->wp == out->ep) { out->write(ctx, out->state, out->bp, out->wp - out->bp); out->wp = out->bp; } + *out->wp++ = x; } else { -- cgit v1.2.3