]> git.sur5r.net Git - cc65/blobdiff - libsrc/common/getcwd.s
The spans do now contain the size of a span, no longer the end offset.
[cc65] / libsrc / common / getcwd.s
index dc1662e6da15c66029ec361bdb0d491296791397..b3cfbefcff37d362a9e7d30aa36d92590567cf51 100644 (file)
@@ -53,12 +53,10 @@ loop:   inc     ptr2
 
 overflow:
         lda     #<ERANGE
-        sta     __errno
-        lda     #>ERANGE
-        sta     __errno+1
-        tax                     ; High byte of ERANGE is zero, return zero
-        rts
+        jsr     __seterrno      ; Returns 0 in A
+        tax                     ; Return zero
+        rts                        
+
 ; Success, return buf
 
 done:   lda     ptr1