From 0010ee021a6c79eb766b805f5fa1485f13bb51f2 Mon Sep 17 00:00:00 2001 From: Akihiro Sagawa Date: Sat, 9 Mar 2013 16:56:40 +0900 Subject: [PATCH] msvcrt: Fix incorrect casts in _wcstoi64_l and _wcstoui64_l. --- dlls/msvcrt/tests/string.c | 8 ++++---- dlls/msvcrt/wcs.c | 6 +++--- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/dlls/msvcrt/tests/string.c b/dlls/msvcrt/tests/string.c index 98d79c485c9..31314fddbdc 100644 --- a/dlls/msvcrt/tests/string.c +++ b/dlls/msvcrt/tests/string.c @@ -2491,8 +2491,8 @@ static void test__wcstoi64(void) res = p_wcstoi64(digit, NULL, 10); ok(res == 9, "res != 9\n"); res = p_wcstoi64(stock, &endpos, 10); - todo_wine ok(res == 0, "res != 0\n"); - todo_wine ok(endpos == stock, "Incorrect endpos (%p-%p)\n", stock, endpos); + ok(res == 0, "res != 0\n"); + ok(endpos == stock, "Incorrect endpos (%p-%p)\n", stock, endpos); res = p_wcstoi64(tamil, &endpos, 10); ok(res == 0, "res != 0\n"); ok(endpos == tamil, "Incorrect endpos (%p-%p)\n", tamil, endpos); @@ -2506,8 +2506,8 @@ static void test__wcstoi64(void) ures = p_wcstoui64(digit, NULL, 10); ok(ures == 9, "ures != 9\n"); ures = p_wcstoui64(stock, &endpos, 10); - todo_wine ok(ures == 0, "ures != 0\n"); - todo_wine ok(endpos == stock, "Incorrect endpos (%p-%p)\n", stock, endpos); + ok(ures == 0, "ures != 0\n"); + ok(endpos == stock, "Incorrect endpos (%p-%p)\n", stock, endpos); ures = p_wcstoui64(tamil, &endpos, 10); ok(ures == 0, "ures != 0\n"); ok(endpos == tamil, "Incorrect endpos (%p-%p)\n", tamil, endpos); diff --git a/dlls/msvcrt/wcs.c b/dlls/msvcrt/wcs.c index a0b1cb6ce4b..ba53084683a 100644 --- a/dlls/msvcrt/wcs.c +++ b/dlls/msvcrt/wcs.c @@ -1395,7 +1395,7 @@ __int64 CDECL MSVCRT__wcstoi64_l(const MSVCRT_wchar_t *nptr, } while(*nptr) { - char cur = tolowerW(*nptr); + MSVCRT_wchar_t cur = tolowerW(*nptr); int v; if(isdigitW(cur)) { @@ -1493,10 +1493,10 @@ unsigned __int64 CDECL MSVCRT__wcstoui64_l(const MSVCRT_wchar_t *nptr, } while(*nptr) { - char cur = tolowerW(*nptr); + MSVCRT_wchar_t cur = tolowerW(*nptr); int v; - if(isdigit(cur)) { + if(isdigitW(cur)) { if(cur >= '0'+base) break; v = *nptr-'0';