From 8e6accf516d719669989cfc70f824ed56e2ec60b Mon Sep 17 00:00:00 2001 From: Robin Watts Date: Fri, 6 Jan 2012 12:03:23 +0000 Subject: Fix xps tiff context problem. Exactly parallel to the png problem fixed a few days ago. Thanks to Zeniko for pointing this out. --- xps/xps_tiff.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'xps') 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 */ -- cgit v1.2.3