diff options
| author | NIIBE Yutaka <[email protected]> | 2025-11-14 05:30:09 +0000 |
|---|---|---|
| committer | NIIBE Yutaka <[email protected]> | 2025-11-14 05:30:09 +0000 |
| commit | 8a95e963d53a7ae1d74926d8d267ddd70dc1fb7c (patch) | |
| tree | f7171a7c73661642fb7bbf639c9e3f6865bf9c3e /common/t-stringhelp.c | |
| parent | scd:nks: Make newer TCOS signature cards work. (diff) | |
| download | gnupg-8a95e963d53a7ae1d74926d8d267ddd70dc1fb7c.tar.gz gnupg-8a95e963d53a7ae1d74926d8d267ddd70dc1fb7c.zip | |
common: Fix the test of t-stringhelp.
* common/t-stringhelp.c (stresc): Don't put newline when escaped.
--
Reported-by: 8b79fe4dd0581c1cd000e1fbecba9f39e16a396a
Signed-off-by: NIIBE Yutaka <[email protected]>
Diffstat (limited to 'common/t-stringhelp.c')
| -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; |
