diff options
author | Tor Andersson <tor.andersson@artifex.com> | 2018-02-07 17:48:45 +0100 |
---|---|---|
committer | Tor Andersson <tor.andersson@artifex.com> | 2018-02-08 13:22:51 +0100 |
commit | fb59e97f2a6361ba0ddde3fe4f6765bef075a55d (patch) | |
tree | 54724da7e80caec977138ba27a5fd44a20c0a8d5 /source | |
parent | 84087db5fe091bdeeaa73069c21a86f5b1a175fd (diff) | |
download | mupdf-fb59e97f2a6361ba0ddde3fe4f6765bef075a55d.tar.xz |
Fix silly mistake in fz_output buffering.
fz_write_byte forgot to write the byte after needing to flush
the buffer.
Diffstat (limited to 'source')
-rw-r--r-- | source/fitz/output.c | 7 |
1 files changed, 2 insertions, 5 deletions
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 { |