From: schwarze Date: Sat, 10 Oct 2015 13:54:22 +0000 (+0000) Subject: Code points U+10000 to U+fffff are valid, too. X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=c9a21f1470077af657c520286f0cc62dd791a50b;p=openbsd 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@ --- 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 {