diff options
author | Ingo Schwarze <schwarze@cvs.openbsd.org> | 2015-10-10 13:54:23 +0000 |
---|---|---|
committer | Ingo Schwarze <schwarze@cvs.openbsd.org> | 2015-10-10 13:54:23 +0000 |
commit | 0a9d5c4ba27a208e4d7e2a153432d57ae5fc9ed3 (patch) | |
tree | 922dc1f7bfb252ab0ad833add3a57425a7df653c /lib/libc/citrus | |
parent | 19d15a50a294eaf734c903ee60b3cc25e1f358cc (diff) |
Code points U+10000 to U+fffff are valid, too.
Fixing a regression in wcrtomb(3) found with the mandoc testsuite
that was caused by the last commit.
OK semarie@ bentley@
Diffstat (limited to 'lib/libc/citrus')
-rw-r--r-- | lib/libc/citrus/citrus_utf8.c | 4 |
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 { |