summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/ptx.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/ptx.c b/src/ptx.c
index dafcbe22a..8f7ae95a4 100644
--- a/src/ptx.c
+++ b/src/ptx.c
@@ -388,6 +388,10 @@ copy_unescaped_string (const char *string)
string++;
break;
+ case '\0': /* lone backslash at end of string */
+ /* ignore it */
+ break;
+
default:
*cursor++ = '\\';
*cursor++ = *string++;