Commit 0010ee02 authored by Akihiro Sagawa's avatar Akihiro Sagawa Committed by Alexandre Julliard

msvcrt: Fix incorrect casts in _wcstoi64_l and _wcstoui64_l.

parent 564b6824
......@@ -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);
......
......@@ -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';
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment