From: Kevin Day Date: Sat, 2 May 2020 04:32:42 +0000 (-0500) Subject: Bugfix: is_word tests were using the wrong function and there is no ASCII zero-width... X-Git-Tag: 0.5.0~301 X-Git-Url: https://git.kevux.org/?a=commitdiff_plain;h=ec8aa03ce920386af780562fadecd8a3ffb41f2d;p=fll Bugfix: is_word tests were using the wrong function and there is no ASCII zero-width space --- diff --git a/level_0/f_utf/c/utf.c b/level_0/f_utf/c/utf.c index 08a3c4b..5573aea 100644 --- a/level_0/f_utf/c/utf.c +++ b/level_0/f_utf/c/utf.c @@ -619,7 +619,7 @@ extern "C" { uint8_t width = f_macro_utf_byte_width_is(*character); if (width == 0) { - if (iscntrl(*character) || *character == '_') { + if (isalnum(*character) || *character == '_') { return f_true; } @@ -653,7 +653,7 @@ extern "C" { uint8_t width = f_macro_utf_byte_width_is(*character); if (width == 0) { - if (iscntrl(*character) || *character == '_' || *character == '-') { + if (isalnum(*character) || *character == '_' || *character == '-') { return f_true; } @@ -687,10 +687,7 @@ extern "C" { uint8_t width = f_macro_utf_byte_width_is(*character); if (width == 0) { - if (isspace(*character)) { - return f_true; - } - + // There are no zero-width spaces in ASCII. return f_false; }