Fix strtoul 'endptr' return value: It should point to the first invalid character,

not to the last valid character.
This commit is contained in:
Christian Groessler
2013-09-11 21:53:13 +02:00
parent ac9f0d6a05
commit ebfb4a0b52

View File

@@ -97,7 +97,7 @@ unsigned long __fastcall__ strtoul (const char* nptr, char** endptr, int base)
*/ */
if (endptr) { if (endptr) {
if (CvtCount > 0) { if (CvtCount > 0) {
*endptr = (char*) S - 1; *endptr = (char*) S;
} else { } else {
*endptr = (char*) nptr; *endptr = (char*) nptr;
} }