diff options
author | Tor Andersson <tor.andersson@artifex.com> | 2018-05-09 13:06:29 +0200 |
---|---|---|
committer | Tor Andersson <tor.andersson@artifex.com> | 2018-05-09 15:33:15 +0200 |
commit | 39fbd4b483c20c526908353d8b3055db1b04dcb4 (patch) | |
tree | 83a59ea9ae6ab9e87d4f61a09776c5bad68dcdef /source | |
parent | cd0632e90df78ca269f56bccfd3019c292f9c315 (diff) | |
download | mupdf-39fbd4b483c20c526908353d8b3055db1b04dcb4.tar.xz |
Fix object formatting for null object.
Diffstat (limited to 'source')
-rw-r--r-- | source/pdf/pdf-object.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/source/pdf/pdf-object.c b/source/pdf/pdf-object.c index 4360ea7c..44f5ff94 100644 --- a/source/pdf/pdf-object.c +++ b/source/pdf/pdf-object.c @@ -1987,17 +1987,17 @@ static void fmt_obj(fz_context *ctx, struct fmt *fmt, pdf_obj *obj) { char buf[256]; - if (!obj) - fmt_puts(ctx, fmt, "<NULL>"); + if (obj == PDF_NULL) + fmt_puts(ctx, fmt, "null"); + else if (obj == PDF_TRUE) + fmt_puts(ctx, fmt, "true"); + else if (obj == PDF_FALSE) + fmt_puts(ctx, fmt, "false"); else if (pdf_is_indirect(ctx, obj)) { fz_snprintf(buf, sizeof buf, "%d %d R", pdf_to_num(ctx, obj), pdf_to_gen(ctx, obj)); fmt_puts(ctx, fmt, buf); } - else if (pdf_is_null(ctx, obj)) - fmt_puts(ctx, fmt, "null"); - else if (pdf_is_bool(ctx, obj)) - fmt_puts(ctx, fmt, pdf_to_bool(ctx, obj) ? "true" : "false"); else if (pdf_is_int(ctx, obj)) { fz_snprintf(buf, sizeof buf, "%d", pdf_to_int(ctx, obj)); |