crt: avoid sign-extension of argument to isleadbyte in mbrtowc

Passing an argument of type `char` to isleadbyte may result in
sign-extension of its argument. crtdll.dll's isleadbyte does not
handle sign-extended input properly, which result in incorrect
behavior of mbrlen and mbrtowc functions.

Add cast to `unsigned char` to avoid this.

Signed-off-by: Kirill Makurin <maiddaisuki@outlook.com>
Signed-off-by: LIU Hao <lh_mouse@126.com>
1 file changed