summaryrefslogtreecommitdiff
path: root/unicode.h
diff options
context:
space:
mode:
authorpommicket <pommicket@gmail.com>2023-09-19 14:14:07 -0400
committerpommicket <pommicket@gmail.com>2023-09-19 14:14:21 -0400
commit4d247b00b04ad143ab6a0da4b94bebeb5be7320d (patch)
tree8b7d271bfba65b34577c1fe9b8ed146d4ae7b56a /unicode.h
parent42f3f808e3147a8b67d5d65fcc197c6fa8e81b46 (diff)
fix dedent issue
resolves #1
Diffstat (limited to 'unicode.h')
-rw-r--r--unicode.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/unicode.h b/unicode.h
index cd6a965..c540bf4 100644
--- a/unicode.h
+++ b/unicode.h
@@ -12,6 +12,7 @@
#include <stddef.h>
#include <stdint.h>
+#include <stdbool.h>
static bool unicode_is_start_of_code_point(uint8_t byte) {
// see https://en.wikipedia.org/wiki/UTF-8#Encoding
@@ -228,7 +229,7 @@ static size_t unicode_utf16_to_utf8_offset(const char *str, size_t utf16_offset)
}
static bool unicode_is_valid_utf8(const char *cstr) {
- char32_t c = 0;
+ uint32_t c = 0;
while (*cstr) {
size_t n = unicode_utf8_to_utf32(&c, cstr, 4);
if (n >= (size_t)-2)