From f111e3ca530646dc84437a2bf44aaa8d3a26ca94 Mon Sep 17 00:00:00 2001 From: Tom Ryder Date: Sat, 24 Feb 2018 02:12:41 +1300 Subject: Type is_utf8_cont for clarity --- wtf8.c | 2 +- wtf8.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/wtf8.c b/wtf8.c index 68de1ca..09cb9b3 100644 --- a/wtf8.c +++ b/wtf8.c @@ -4,7 +4,7 @@ * Check if first two bits of the character are "10", meaning it's a UTF-8 * continuation character */ -int is_utf8_cont(char c) { +int is_utf8_cont(unsigned char c) { return (c & 0xC0) == 0x80; } diff --git a/wtf8.h b/wtf8.h index c4241a8..5a80f30 100644 --- a/wtf8.h +++ b/wtf8.h @@ -1,6 +1,6 @@ #include #include -int is_utf8_cont(char); +int is_utf8_cont(unsigned char); void print_octets(char *); void print_characters(char *); -- cgit v1.2.3