From: Jactry Zeng jzeng@codeweavers.com
--- dlls/msvcrt/ctype.c | 4 ++++ dlls/msvcrt/tests/string.c | 6 +++--- 2 files changed, 7 insertions(+), 3 deletions(-)
diff --git a/dlls/msvcrt/ctype.c b/dlls/msvcrt/ctype.c index a1805324c1f..311cfacb71c 100644 --- a/dlls/msvcrt/ctype.c +++ b/dlls/msvcrt/ctype.c @@ -536,7 +536,11 @@ int CDECL _tolower_l(int c, _locale_t locale) locinfo = locale->locinfo;
if((unsigned)c < 256) + { + if(locinfo->pctype[c] & _LEADBYTE) + return c; return locinfo->pclmap[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 ddfab54daf3..70da88707a4 100644 --- a/dlls/msvcrt/tests/string.c +++ b/dlls/msvcrt/tests/string.c @@ -3404,7 +3404,7 @@ static void test_tolower(void) ok(errno == EILSEQ, "Got errno %d.\n", errno); errno = 0xdeadbeef; ret = p_tolower((unsigned char)0xd0); - todo_wine ok(ret == 0xd0, "Got %#x.\n", ret); + ok(ret == 0xd0, "Got %#x.\n", ret); ok(errno == 0xdeadbeef, "Got errno %d.\n", errno);
ok(setlocale(LC_ALL, "Korean_Korea.949") != NULL, "setlocale failed.\n"); @@ -3414,7 +3414,7 @@ static void test_tolower(void) ok(errno == EILSEQ, "Got errno %d.\n", errno); errno = 0xdeadbeef; ret = p_tolower((unsigned char)0xd0); - todo_wine ok(ret == 0xd0, "Got %#x.\n", ret); + ok(ret == 0xd0, "Got %#x.\n", ret); ok(errno == 0xdeadbeef, "Got errno %d.\n", errno);
ok(setlocale(LC_ALL, "Chinese_Taiwan.950") != NULL, "setlocale failed.\n"); @@ -3424,7 +3424,7 @@ static void test_tolower(void) ok(errno == EILSEQ, "Got errno %d.\n", errno); errno = 0xdeadbeef; ret = p_tolower((unsigned char)0xd0); - todo_wine ok(ret == 0xd0, "Got %#x.\n", ret); + ok(ret == 0xd0, "Got %#x.\n", ret); ok(errno == 0xdeadbeef, "Got errno %d.\n", errno);
setlocale(LC_ALL, "C");