snac2

Fork of https://codeberg.org/grunfink/snac2
git clone https://git.inz.fi/snac2
Log | Files | Refs | README | LICENSE

commit 1152450d1c1f742a20d6db2d3fce3169ff80a8a1
parent 60f77b6cad7f64a4b6ef44010c8d103093ce32c2
Author: default <nobody@localhost>
Date:   Mon,  6 Mar 2023 13:28:15 +0100

Changed the way invalid codes in strings are stripped.

Diffstat:
Mformat.c | 3+--
1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/format.c b/format.c @@ -183,8 +183,7 @@ d_char *sanitize(const char *content) /* strip dangerous control codes */ for (n = 0; content2[n]; n++) { - if (content2[n] > 0x0 && content2[n] < 0x20 && - content2[n] != '\r' && content2[n] != '\n') + if (xs_type(&content2[n]) != XSTYPE_STRING) content2[n] = ' '; }