From 2e0ab6f8632ddc849bcdf38b8ca44a29b12a8e5c Mon Sep 17 00:00:00 2001
From: "ol.sc"
Date: Tue, 1 Jun 2010 21:01:59 +0000
Subject: [PATCH] Set _oserror only on error.
git-svn-id: svn://svn.cc65.org/cc65/trunk@4679 b7a2c559-68d2-44c3-8de9-860c34a00d81
---
libsrc/apple2/rootdir.s | 10 +++++++---
1 file changed, 7 insertions(+), 3 deletions(-)
diff --git a/libsrc/apple2/rootdir.s b/libsrc/apple2/rootdir.s
index a64bf75bb..baa4b445d 100644
--- a/libsrc/apple2/rootdir.s
+++ b/libsrc/apple2/rootdir.s
@@ -28,7 +28,7 @@ _rootdir:
lda #ON_LINE_CALL
ldx #ON_LINE_COUNT
jsr callmli
- bcs :+
+ bcs oserr
; Get volume name length
ldy #$00
@@ -46,7 +46,11 @@ _rootdir:
lda #$00
sta (ptr1),y
- ; Return success or error
-: sta __oserror
+ ; Return success
+ tax
+ rts
+
+ ; Return error
+oserr: sta __oserror
ldx #$00
rts