From: Jactry Zeng jzeng@codeweavers.com
--- dlls/msvcrt/ctype.c | 4 ++++ dlls/msvcrt/tests/string.c | 4 ++-- 2 files changed, 6 insertions(+), 2 deletions(-)
diff --git a/dlls/msvcrt/ctype.c b/dlls/msvcrt/ctype.c index 311cfacb71c..1297bc56046 100644 --- a/dlls/msvcrt/ctype.c +++ b/dlls/msvcrt/ctype.c @@ -482,7 +482,11 @@ int CDECL _toupper_l(int c, _locale_t locale) locinfo = locale->locinfo;
if((unsigned)c < 256) + { + if(locinfo->pctype[c] & _LEADBYTE) + return c; return locinfo->pcumap[c]; + }
if(locinfo->pctype[(c>>8)&255] & _LEADBYTE) *p++ = (c>>8) & 255; diff --git a/dlls/msvcrt/tests/string.c b/dlls/msvcrt/tests/string.c index 967f3f20d75..2b1efb764f6 100644 --- a/dlls/msvcrt/tests/string.c +++ b/dlls/msvcrt/tests/string.c @@ -5005,7 +5005,7 @@ static void test_toupper(void) ok(errno == EILSEQ, "Got errno %d.\n", errno); errno = 0xdeadbeef; ret = toupper(0xf0); - todo_wine ok(ret == 0xf0, "Got %#x.\n", ret); + ok(ret == 0xf0, "Got %#x.\n", ret); ok(errno == 0xdeadbeef, "Got errno %d.\n", errno);
ok(setlocale(LC_ALL, "Chinese_China.936") != NULL, "setlocale failed.\n"); @@ -5015,7 +5015,7 @@ static void test_toupper(void) ok(errno == EILSEQ, "Got errno %d.\n", errno); errno = 0xdeadbeef; ret = toupper(0xf0); - todo_wine ok(ret == 0xf0, "Got %#x.\n", ret); + ok(ret == 0xf0, "Got %#x.\n", ret); ok(errno == 0xdeadbeef, "Got errno %d.\n", errno);
setlocale(LC_ALL, "C");