summaryrefslogtreecommitdiff
path: root/string32.c
diff options
context:
space:
mode:
authorLeo Tenenbaum <pommicket@gmail.com>2021-02-16 12:33:11 -0500
committerLeo Tenenbaum <pommicket@gmail.com>2021-02-16 12:33:11 -0500
commit824c4ff4be5a0bf55b6644fed06fcfe2248c4301 (patch)
tree0eb56394e769e23005a9f03ffea0557c2577e542 /string32.c
parent4bde24cb63313f636ac72b449f54d68515efe485 (diff)
started getting :build to work
Diffstat (limited to 'string32.c')
-rw-r--r--string32.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/string32.c b/string32.c
index fb1399e..09874bc 100644
--- a/string32.c
+++ b/string32.c
@@ -36,7 +36,7 @@ String32 str32_from_utf8(char const *utf8) {
char32_t c = 0;
size_t n = unicode_utf8_to_utf32(&c, utf8_p, (size_t)(utf8_end - utf8_p));
if (n == 0 // null character. this shouldn't happen.
- || n == (size_t)(-1) // invalid UTF-8
+ || n >= (size_t)(-2) // invalid UTF-8
) {
free(widestr);
widestr = wide_p = NULL;