From ff2bd7646725c2db1ef1f700b8b92e7820467e0d Mon Sep 17 00:00:00 2001 From: Tor Andersson Date: Tue, 20 Jul 2010 19:35:11 +0000 Subject: Fix bug in fmtobj -- move the check for indirect first. --- fitz/obj_print.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'fitz') diff --git a/fitz/obj_print.c b/fitz/obj_print.c index cb98c13c..73b82477 100644 --- a/fitz/obj_print.c +++ b/fitz/obj_print.c @@ -220,6 +220,11 @@ static void fmtobj(struct fmt *fmt, fz_obj *obj) if (!obj) fmtputs(fmt, ""); + else if (fz_isindirect(obj)) + { + sprintf(buf, "%d %d R", fz_tonum(obj), fz_togen(obj)); + fmtputs(fmt, buf); + } else if (fz_isnull(obj)) fmtputs(fmt, "null"); else if (fz_isbool(obj)) @@ -264,11 +269,6 @@ static void fmtobj(struct fmt *fmt, fz_obj *obj) fmtarray(fmt, obj); else if (fz_isdict(obj)) fmtdict(fmt, obj); - else if (fz_isindirect(obj)) - { - sprintf(buf, "%d %d R", fz_tonum(obj), fz_togen(obj)); - fmtputs(fmt, buf); - } else fmtputs(fmt, ""); } -- cgit v1.2.3