summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaul Gardiner <paulg.artifex@glidos.net>2012-08-02 15:09:29 +0100
committerPaul Gardiner <paulg.artifex@glidos.net>2012-08-02 16:05:05 +0100
commited26f2001c2acfa3ae24d237b6a4bac677fa66ec (patch)
tree3dfeabf5e049e971e7aa73dceda613d1c117fc31
parent5379fed0ece9cc51e124eb30d5e6486049f25c12 (diff)
downloadmupdf-ed26f2001c2acfa3ae24d237b6a4bac677fa66ec.tar.xz
Fix bug in writing of strings: backslash not quoted
-rw-r--r--pdf/pdf_object.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/pdf/pdf_object.c b/pdf/pdf_object.c
index 7021fa5d..819607ce 100644
--- a/pdf/pdf_object.c
+++ b/pdf/pdf_object.c
@@ -1230,6 +1230,8 @@ static void fmt_str(struct fmt *fmt, pdf_obj *obj)
fmt_puts(fmt, "\\(");
else if (c == ')')
fmt_puts(fmt, "\\)");
+ else if (c == '\\')
+ fmt_puts(fmt, "\\\\");
else if (c < 32 || c >= 127) {
char buf[16];
fmt_putc(fmt, '\\');