]> git.sur5r.net Git - cc65/blobdiff - libsrc/common/strtol.c
The spans do now contain the size of a span, no longer the end offset.
[cc65] / libsrc / common / strtol.c
index b36dd8932ddf4da256a1ad15e1fdcbf7ba64a4d4..b7ccdf24cbaf2cd85962a44a4710451e5bdf18d5 100644 (file)
@@ -71,7 +71,7 @@ long __fastcall__ strtol (const char* nptr, char** endptr, int base)
         } else if (isupper (*S)) {
             DigitVal = *S - ('A' - 10);
         } else if (islower (*S)) {
-            DigitVal = *S - ('a' - 10);      
+            DigitVal = *S - ('a' - 10);
         } else {
             /* Unknown character */
             break;
@@ -110,7 +110,7 @@ long __fastcall__ strtol (const char* nptr, char** endptr, int base)
 
     /* Handle overflow */
     if (Ovf) {
-        errno = ERANGE;
+        _seterrno (ERANGE);
         if (Minus) {
             return LONG_MIN;
         } else {