From 4e599d372fa6ef67daf564b79b0f00816235ae88 Mon Sep 17 00:00:00 2001 From: cuz Date: Sun, 4 Jun 2006 10:29:13 +0000 Subject: [PATCH] mouse_unload didn't return a valid erro code on success. git-svn-id: svn://svn.cc65.org/cc65/trunk@3753 b7a2c559-68d2-44c3-8de9-860c34a00d81 --- libsrc/mouse/mouse_unload.s | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/libsrc/mouse/mouse_unload.s b/libsrc/mouse/mouse_unload.s index 352ec12a2..59ec94949 100644 --- a/libsrc/mouse/mouse_unload.s +++ b/libsrc/mouse/mouse_unload.s @@ -8,26 +8,29 @@ .include "mouse-kernel.inc" .include "modload.inc" + .import return0 + + _mouse_unload: lda _mouse_drv + pha ; Save pointer to driver ora _mouse_drv+1 beq no_driver ; No driver - - lda _mouse_drv - pha lda _mouse_drv+1 - pha ; Save pointer to driver + pha jsr _mouse_uninstall ; Uninstall the driver pla tax pla ; Get pointer to driver - jmp _mod_free ; Free the driver + jsr _mod_free ; Free the driver + jmp return0 ; Return MOUSE_ERR_OK no_driver: tax ; X = 0 + pla ; Remove pushed junk lda #