Fix strtoul 'endptr' return value: It should point to the first invalid character,
not to the last valid character.
This commit is contained in:
parent
a32366b124
commit
5a84da0d4e
1 changed files with 1 additions and 1 deletions
|
@ -97,7 +97,7 @@ unsigned long __fastcall__ strtoul (const char* nptr, char** endptr, int base)
|
|||
*/
|
||||
if (endptr) {
|
||||
if (CvtCount > 0) {
|
||||
*endptr = (char*) S - 1;
|
||||
*endptr = (char*) S;
|
||||
} else {
|
||||
*endptr = (char*) nptr;
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue