diff options
author | Tor Andersson <tor@ghostscript.com> | 2011-02-04 10:29:02 +0000 |
---|---|---|
committer | Tor Andersson <tor@ghostscript.com> | 2011-02-04 10:29:02 +0000 |
commit | 6e99a4c2803a4d5b0cdaaf1e27b425dfa3d1fd1d (patch) | |
tree | 82c337dbde5ddd0edb72a6a31882e643b25b972c /fitz | |
parent | 17921bc919273990bbf68e3ec8e8c8ef24246930 (diff) | |
download | mupdf-6e99a4c2803a4d5b0cdaaf1e27b425dfa3d1fd1d.tar.xz |
Don't reset stream wp pointer at end of file, since that will clobber streams opened with openbuffer.
Diffstat (limited to 'fitz')
-rw-r--r-- | fitz/stm_read.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/fitz/stm_read.c b/fitz/stm_read.c index fe34eaa8..4e42ed85 100644 --- a/fitz/stm_read.c +++ b/fitz/stm_read.c @@ -47,7 +47,7 @@ fz_fillbuffer(fz_stream *stm) n = fz_read(stm, stm->bp, stm->ep - stm->bp); if (n < 0) fz_catch(n, "read error; treating as end of file"); - else + else if (n > 0) { stm->rp = stm->bp; stm->wp = stm->bp + n; |