mirror of
https://github.com/cc65/cc65.git
synced 2024-12-23 19:29:37 +00:00
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
ac9f0d6a05
commit
ebfb4a0b52
@ -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…
Reference in New Issue
Block a user