diff options
| -rw-r--r-- | common/t-stringhelp.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/common/t-stringhelp.c b/common/t-stringhelp.c index 6723d65b6..b43bb7932 100644 --- a/common/t-stringhelp.c +++ b/common/t-stringhelp.c @@ -978,6 +978,10 @@ test_split_fields_colon (void) } +/* + * Escape the newline control character. + * Replace the space into underscore character. + */ static char * stresc (char *s) { @@ -996,8 +1000,7 @@ stresc (char *s) else if (*p == '\n') { p[l ++] = '\\'; - p[l ++] = 'n'; - p[l] = '\n'; + p[l] = 'n'; } else p[l] = *s; |
