]> git.sur5r.net Git - cc65/commitdiff
Fixed error handling
authorcuz <cuz@b7a2c559-68d2-44c3-8de9-860c34a00d81>
Sun, 4 Jun 2006 09:59:02 +0000 (09:59 +0000)
committercuz <cuz@b7a2c559-68d2-44c3-8de9-860c34a00d81>
Sun, 4 Jun 2006 09:59:02 +0000 (09:59 +0000)
git-svn-id: svn://svn.cc65.org/cc65/trunk@3749 b7a2c559-68d2-44c3-8de9-860c34a00d81

libsrc/mouse/mouse_load.c

index a04a8eaad4b365510273a31a08663575c991e2bd..bc15f26d456a96c5b9b2a15a84c80d5ac33a0ae9 100644 (file)
@@ -80,17 +80,17 @@ unsigned char __fastcall__ mouse_load_driver (const struct mouse_callbacks* c,
            /* If the driver did not install correctly, remove it from
             * memory again.
             */
-           if (Res != MLOAD_OK) { 
+           if (Res != MOUSE_ERR_OK) {
                 /* Do not call mouse_uninstall here, since the driver is not
                  * correctly installed.
                  */
                 mod_free (mouse_drv);
                 mouse_clear_ptr ();
             }
-        }
 
-        /* Return the error code */
-        return Res;
+            /* Return the error code */
+            return Res;
+        }
     }
 
     /* Error loading the driver */