summaryrefslogtreecommitdiff
path: root/xps
diff options
context:
space:
mode:
authorRobin Watts <robin.watts@artifex.com>2012-01-06 12:03:23 +0000
committerRobin Watts <robin@ghostscript.com>2012-01-06 13:49:24 +0000
commit8e6accf516d719669989cfc70f824ed56e2ec60b (patch)
tree738df184667154cb1fc3aeff35831de447b0f505 /xps
parent8c0b958c8cd04eae8a65803db700240123fd38be (diff)
downloadmupdf-8e6accf516d719669989cfc70f824ed56e2ec60b.tar.xz
Fix xps tiff context problem.
Exactly parallel to the png problem fixed a few days ago. Thanks to Zeniko for pointing this out.
Diffstat (limited to 'xps')
-rw-r--r--xps/xps_tiff.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/xps/xps_tiff.c b/xps/xps_tiff.c
index 01e5be9b..b7d8ee04 100644
--- a/xps/xps_tiff.c
+++ b/xps/xps_tiff.c
@@ -699,7 +699,7 @@ xps_swap_byte_order(byte *buf, int n)
}
static void
-xps_decode_tiff_header(struct tiff *tiff, byte *buf, int len)
+xps_decode_tiff_header(fz_context *ctx, struct tiff *tiff, byte *buf, int len)
{
unsigned version;
unsigned offset;
@@ -707,7 +707,7 @@ xps_decode_tiff_header(struct tiff *tiff, byte *buf, int len)
unsigned i;
memset(tiff, 0, sizeof(struct tiff));
-
+ tiff->ctx = ctx;
tiff->bp = buf;
tiff->rp = buf;
tiff->ep = buf + len;
@@ -765,8 +765,7 @@ xps_decode_tiff(fz_context *ctx, byte *buf, int len)
fz_pixmap *image;
struct tiff tiff;
- tiff.ctx = ctx;
- xps_decode_tiff_header(&tiff, buf, len);
+ xps_decode_tiff_header(ctx, &tiff, buf, len);
/* Decode the image strips */