script: fix escaping in the dot command
This commit is contained in:
parent
ca05277ce7
commit
aaf6385811
@ -1805,9 +1805,9 @@ string_to_str (const struct item_string *string, struct buffer *buf)
|
|||||||
for (size_t i = 0; i < string->len; i++)
|
for (size_t i = 0; i < string->len; i++)
|
||||||
{
|
{
|
||||||
char c = string->value[i];
|
char c = string->value[i];
|
||||||
if (c == '\n') buffer_append (buf, "\\\n", 2);
|
if (c == '\n') buffer_append (buf, "\\n", 2);
|
||||||
else if (c == '\r') buffer_append (buf, "\\\r", 2);
|
else if (c == '\r') buffer_append (buf, "\\r", 2);
|
||||||
else if (c == '\t') buffer_append (buf, "\\\t", 2);
|
else if (c == '\t') buffer_append (buf, "\\t", 2);
|
||||||
else if (!isprint (c))
|
else if (!isprint (c))
|
||||||
{
|
{
|
||||||
char tmp[8];
|
char tmp[8];
|
||||||
|
Loading…
Reference in New Issue
Block a user