From aaf638581123312c6315622df2fa7c73e3f65d61 Mon Sep 17 00:00:00 2001
From: Přemysl Janouch
Date: Fri, 3 Oct 2014 22:21:10 +0200
Subject: script: fix escaping in the dot command
---
plugins/script | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
(limited to 'plugins')
diff --git a/plugins/script b/plugins/script
index 2e8fb0d..5300639 100755
--- a/plugins/script
+++ b/plugins/script
@@ -1805,9 +1805,9 @@ string_to_str (const struct item_string *string, struct buffer *buf)
for (size_t i = 0; i < string->len; i++)
{
char c = string->value[i];
- if (c == '\n') buffer_append (buf, "\\\n", 2);
- else if (c == '\r') buffer_append (buf, "\\\r", 2);
- else if (c == '\t') buffer_append (buf, "\\\t", 2);
+ if (c == '\n') buffer_append (buf, "\\n", 2);
+ else if (c == '\r') buffer_append (buf, "\\r", 2);
+ else if (c == '\t') buffer_append (buf, "\\t", 2);
else if (!isprint (c))
{
char tmp[8];
--
cgit v1.2.3-70-g09d2