From 3e362e872c0596ff3e058c791a416ac7f8ae4c67 Mon Sep 17 00:00:00 2001 From: Dale Weiler Date: Thu, 10 Oct 2013 22:03:13 -0400 Subject: [PATCH] Wrong operand order it's 0xf4u-0xc2u i.e 0x32. --- utf8.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/utf8.c b/utf8.c index 4396157..6089df1 100644 --- a/utf8.c +++ b/utf8.c @@ -126,7 +126,7 @@ int utf8_to(utf8ch_t *i, const unsigned char *s, size_t n) { if (*s < 0x80) return !!(*i = *s); - if (*s-0xC2U > 0xFFFFFFCE) + if (*s-0xC2U > 0x32) return 0; c = utf8_tab[*s++-0xC2U]; -- 2.39.2