aboutsummaryrefslogtreecommitdiff
path: root/plugins
diff options
context:
space:
mode:
authorPřemysl Janouch <p.janouch@gmail.com>2014-10-03 22:21:10 +0200
committerPřemysl Janouch <p.janouch@gmail.com>2014-10-03 22:21:30 +0200
commitaaf638581123312c6315622df2fa7c73e3f65d61 (patch)
treeefa6c1ef6969978d358bfb6392ec500e8cd6a5f2 /plugins
parentca05277ce7f53f6d406bf0a72af83386c905a129 (diff)
downloadxK-aaf638581123312c6315622df2fa7c73e3f65d61.tar.gz
xK-aaf638581123312c6315622df2fa7c73e3f65d61.tar.xz
xK-aaf638581123312c6315622df2fa7c73e3f65d61.zip
script: fix escaping in the dot command
Diffstat (limited to 'plugins')
-rwxr-xr-xplugins/script6
1 files changed, 3 insertions, 3 deletions
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];