From d3025b14b9c13286b79f256d019a99da9425ea0e Mon Sep 17 00:00:00 2001 From: Rob Landley Date: Sat, 15 May 2021 11:14:03 -0500 Subject: Convert utf8towc from wchar_t to unsigned (to match wctoutf8). The maximum unicode code point is 0x10ffff which is 21 bits. --- toys/example/demo_utf8towc.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'toys/example') diff --git a/toys/example/demo_utf8towc.c b/toys/example/demo_utf8towc.c index 136be6ca..2c6050b1 100644 --- a/toys/example/demo_utf8towc.c +++ b/toys/example/demo_utf8towc.c @@ -19,8 +19,8 @@ void demo_utf8towc_main(void) { mbstate_t mb; int len1, len2; - unsigned u, h; - wchar_t wc1, wc2; + unsigned u, h, wc2; + wchar_t wc1; memset(&mb, 0, sizeof(mb)); for (u = 1; u<=0x10ffff; u++) { -- cgit v1.2.3