aboutsummaryrefslogtreecommitdiff
path: root/toys/example
diff options
context:
space:
mode:
authorRob Landley <rob@landley.net>2021-05-15 11:14:03 -0500
committerRob Landley <rob@landley.net>2021-05-15 11:14:03 -0500
commitd3025b14b9c13286b79f256d019a99da9425ea0e (patch)
tree02a40c59346677cb5f6a51137f4a39d16ae6b743 /toys/example
parent08481ee37ad5070ff1033d57351c3fa456d0729d (diff)
downloadtoybox-d3025b14b9c13286b79f256d019a99da9425ea0e.tar.gz
Convert utf8towc from wchar_t to unsigned (to match wctoutf8).
The maximum unicode code point is 0x10ffff which is 21 bits.
Diffstat (limited to 'toys/example')
-rw-r--r--toys/example/demo_utf8towc.c4
1 files changed, 2 insertions, 2 deletions
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++) {