1
0
mirror of https://github.com/cc65/cc65.git synced 2025-01-11 11:30:13 +00:00

Merge pull request #39 from groessler/something_to_pull

Fix strtoul 'endptr' return value: It should point to the first invalid character,
This commit is contained in:
Oliver Schmidt 2013-09-12 04:05:39 -07:00
commit 31b0e5da23
2 changed files with 2 additions and 2 deletions

View File

@ -102,7 +102,7 @@ long __fastcall__ strtol (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;
} }

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;
} }