summaryrefslogtreecommitdiff
path: root/lib/libc/citrus/citrus_utf8.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/libc/citrus/citrus_utf8.c')
-rw-r--r--lib/libc/citrus/citrus_utf8.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/libc/citrus/citrus_utf8.c b/lib/libc/citrus/citrus_utf8.c
index b6461b09c86..c80f886e569 100644
--- a/lib/libc/citrus/citrus_utf8.c
+++ b/lib/libc/citrus/citrus_utf8.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: citrus_utf8.c,v 1.11 2015/09/26 14:22:40 semarie Exp $ */
+/* $OpenBSD: citrus_utf8.c,v 1.12 2015/10/10 13:54:22 schwarze Exp $ */
/*-
* Copyright (c) 2002-2004 Tim J. Robbins
@@ -313,7 +313,7 @@ _citrus_utf8_ctype_wcrtomb(char * __restrict s,
} else if ((wc & ~0xffff) == 0) {
lead = 0xe0;
len = 3;
- } else if ((wc & ~0x10ffff) == 0) {
+ } else if ((wc & ~0xfffff) == 0 || (wc & ~0x10ffff) == 0) {
lead = 0xf0;
len = 4;
} else {