]> git.sur5r.net Git - cc65/commitdiff
Replace a return value of 0 by 1 as expected by the C standard.
authorcuz <cuz@b7a2c559-68d2-44c3-8de9-860c34a00d81>
Sat, 22 Jul 2000 18:26:31 +0000 (18:26 +0000)
committercuz <cuz@b7a2c559-68d2-44c3-8de9-860c34a00d81>
Sat, 22 Jul 2000 18:26:31 +0000 (18:26 +0000)
git-svn-id: svn://svn.cc65.org/cc65/trunk@189 b7a2c559-68d2-44c3-8de9-860c34a00d81

libsrc/common/longjmp.s

index 6f74f7331597d8ee818b668647bf81692f6f84ee..5941fbfae07ea28672547458ea4b2d11d4b3c3f9 100644 (file)
 _longjmp:
        sta     ptr2            ; Save retval
        stx     ptr2+1
-       jsr     popax           ; get buf
+       ora     ptr2+1          ; Check for 0
+       bne     @L1
+       lda     #1              ; 0 is illegal according to the standard...
+       sta     ptr2            ; ... and must be replaced by 1
+@L1:   jsr     popax           ; get buf
        sta     ptr1
        stx     ptr1+1
        ldy     #0
-          
+
 ; Get the old parameter stack
 
                lda     (ptr1),y