aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTom Ryder <tom@sanctum.geek.nz>2018-02-24 02:12:41 +1300
committerTom Ryder <tom@sanctum.geek.nz>2018-02-24 02:12:41 +1300
commitf111e3ca530646dc84437a2bf44aaa8d3a26ca94 (patch)
treea5853c78d522ddd81c3cc11a2c1f76acd0f17ea4
parentWrap assignment truth test per GCC's fretting (diff)
downloadwtf8-f111e3ca530646dc84437a2bf44aaa8d3a26ca94.tar.gz
wtf8-f111e3ca530646dc84437a2bf44aaa8d3a26ca94.zip
Type is_utf8_cont for clarity
-rw-r--r--wtf8.c2
-rw-r--r--wtf8.h2
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 <stdio.h>
#include <stdlib.h>
-int is_utf8_cont(char);
+int is_utf8_cont(unsigned char);
void print_octets(char *);
void print_characters(char *);