summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoryenatch <yenatch@gmail.com>2014-06-03 16:34:21 -0700
committeryenatch <yenatch@gmail.com>2014-06-03 16:34:21 -0700
commit6718981fb12b579a3ecb13b5ff01ce730514af52 (patch)
treef41e66c1b93b4fd632014ce854b2023b7a8bdf1b
parent21708a2271974e35cbb3eb41fe219a49d7d40ae9 (diff)
Truncate MAX_LEVEL + 1 if it exceeds 8 bits.
If MAX_LEVEL was set to 255, the value could not fit into a byte.
-rw-r--r--main.asm2
1 files changed, 1 insertions, 1 deletions
diff --git a/main.asm b/main.asm
index 9dc5c06a1..8aa288d48 100644
--- a/main.asm
+++ b/main.asm
@@ -61186,7 +61186,7 @@ Function50e1b: ; 50e1b
.asm_50e26
inc d
ld a, d
- cp MAX_LEVEL + 1
+ cp (MAX_LEVEL + 1) % $100
jr z, .asm_50e45
call Function50e47
push hl