diff src/options.asm @ 185:f515712d8cd6

BUGFIX: Check min and max values after PC configuration properly
author heinrichsweikamp
date Sat, 18 Oct 2014 10:03:28 +0200
parents be997abd1f73
children effd7259f5a5
line wrap: on
line diff
--- a/src/options.asm	Fri Oct 17 13:31:14 2014 +0200
+++ b/src/options.asm	Sat Oct 18 10:03:28 2014 +0200
@@ -175,8 +175,9 @@
         movf    opt_min,W
         cpfsgt  INDF1                   ; bigger then opt_min?
         bra     option_check_reset      ; No, reset option
-        movf    INDF1,W
-        cpfsgt  opt_max                 ; bigger then INDF1?
+option_check_enum8:                     ; ENUM8: Check max only
+        incf    opt_max,W
+        cpfslt  INDF1                   ; smaller then opt_max+1?
         bra     option_check_reset      ; No, reset option
         return                          ; in range, return
 
@@ -187,12 +188,6 @@
 option_check_string:
         return
 
-option_check_enum8:
-        movf    INDF1,W
-        cpfsgt  opt_max                 ; bigger then INDF1?
-        bra     option_check_reset      ; No, reset option
-        return                          ; in range, return
-
 ;=============================================================================
 ; Reset an option to its default value.
 ; INPUT:  FSR0 = option handle