locale/UTF-8: Fixed upper bound logic
authorJohn Marino <draco@marino.st>
Sun, 13 Sep 2015 10:08:10 +0000 (12:08 +0200)
committerJohn Marino <draco@marino.st>
Sun, 13 Sep 2015 10:19:43 +0000 (12:19 +0200)
commit3d4b9338af812db4143a3a95fadfe72ecc51fd75
treed9063b4924a1d02f02be4ecd442f5b8c9ade0a29
parent6b231eab9db5ef4d4dc3816487d8e3d48941e0e2
locale/UTF-8: Fixed upper bound logic

The upper bound for UTF-8 is 0x10FFFF.  Using two's complement to check
this range is wrong.  Valid values such as 0x20000, 0x40000 and 0x80000
were wrongly failing will illegal sequence errors.  Using simple
comparison operators should fix the logic.
lib/libc/locale/utf8.c