From a7f392a96fefd667bbcabfc816bbb6b3e3de70ac Mon Sep 17 00:00:00 2001 From: uz Date: Thu, 3 Jun 2010 21:29:28 +0000 Subject: [PATCH] Call __seterrno and save a few bytes. git-svn-id: svn://svn.cc65.org/cc65/trunk@4702 b7a2c559-68d2-44c3-8de9-860c34a00d81 --- libsrc/common/getcwd.s | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/libsrc/common/getcwd.s b/libsrc/common/getcwd.s index dc1662e6d..b3cfbefcf 100644 --- a/libsrc/common/getcwd.s +++ b/libsrc/common/getcwd.s @@ -53,12 +53,10 @@ loop: inc ptr2 overflow: 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 -- 2.39.5