diff options
author | Tor Andersson <tor@ghostscript.com> | 2009-08-12 22:36:24 +0200 |
---|---|---|
committer | Tor Andersson <tor@ghostscript.com> | 2009-08-12 22:36:24 +0200 |
commit | a2f4e3ea5ddc0af8054be17dc8808acf94e32298 (patch) | |
tree | f7a4459119f0dd76a7a1266143d07c70d20ad70d /fitz/obj_print.c | |
parent | b2e3bbf54bc327af7da4f576d87e27713002686c (diff) | |
download | mupdf-a2f4e3ea5ddc0af8054be17dc8808acf94e32298.tar.xz |
Hex-encode non-printable and 8-bit characters in fmtname.
Diffstat (limited to 'fitz/obj_print.c')
-rw-r--r-- | fitz/obj_print.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/fitz/obj_print.c b/fitz/obj_print.c index 3e2094a8..534469ce 100644 --- a/fitz/obj_print.c +++ b/fitz/obj_print.c @@ -138,7 +138,8 @@ static void fmtname(struct fmt *fmt, fz_obj *obj) for (i = 0; s[i]; i++) { - if (isdelim(s[i]) || iswhite(s[i])) + if (isdelim(s[i]) || iswhite(s[i]) || + s[i] == '#' || s[i] < 32 || s[i] > 127) { fmtputc(fmt, '#'); c = (s[i] >> 4) & 0xf; |