msvcrt: Fix incorrect casts in _wcstoi64_l and _wcstoui64_l.

This commit is contained in:
Akihiro Sagawa 2013-03-09 16:56:40 +09:00 committed by Alexandre Julliard
parent 564b682447
commit 0010ee021a
2 changed files with 7 additions and 7 deletions

View file

@ -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);

View file

@ -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';