Index: crt/string/strtoul.c =================================================================== --- crt/string/strtoul.c (revision 71259) +++ crt/string/strtoul.c (working copy) @@ -1,6 +1,6 @@ #include -/* Based on Wine Staging 1.7.37 - dlls/msvcrt/string.c */ +/* Based on Wine Staging 1.9.9 - dlls/msvcrt/string.c */ /********************************************************************* * _strtoi64_l (MSVCRT.@) @@ -9,7 +9,9 @@ */ __int64 CDECL strtoi64_l(const char *nptr, char **endptr, int base, _locale_t locale) { + const char *p = nptr; BOOL negative = FALSE; + BOOL got_digit = FALSE; __int64 ret = 0; #ifndef _LIBCNT_ @@ -53,6 +55,7 @@ break; v = cur-'a'+10; } + got_digit = TRUE; if(negative) v = -v; @@ -74,7 +77,7 @@ } if(endptr) - *endptr = (char*)nptr; + *endptr = (char*)(got_digit ? nptr : p); return ret; }