From 149a2abd07b40f708348bdfe7cddb39cf1cf29e4 Mon Sep 17 00:00:00 2001 From: ceriel Date: Tue, 29 Sep 1987 16:07:10 +0000 Subject: [PATCH] some fixes --- modules/src/string/bts2str.c | 5 +++-- modules/src/string/string.3 | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/modules/src/string/bts2str.c b/modules/src/string/bts2str.c index 749f89ef4..0403f21ae 100644 --- a/modules/src/string/bts2str.c +++ b/modules/src/string/bts2str.c @@ -18,9 +18,10 @@ bts2str(b, n, s) register char *f = b, *t = s; while (n-- > 0) { - if (is_print(*f)) + if (is_print(*f)) { + if (*f == '\\') *t++ = *f; *t++ = *f++; - else { + } else { *t++ = '\\'; *t++ = ((*f >> 6) & 03) + '0'; *t++ = ((*f >> 3) & 07) + '0'; diff --git a/modules/src/string/string.3 b/modules/src/string/string.3 index 62b2f1d77..0e0284020 100644 --- a/modules/src/string/string.3 +++ b/modules/src/string/string.3 @@ -165,7 +165,7 @@ E.g., the row of 2 bytes .RE is turned into the string consisting of the following characters .RS -\&'\e\e' '0' '0' '0' '\e\e' 'n' '\e0' +\&'\e' '0' '0' '0' '\e' 'n' '\e0' .RE The latter string could be represented in C as "\e\e000\e\en". .PP -- 2.34.1