summaryrefslogtreecommitdiff
path: root/lib/std/chartype.myr
diff options
context:
space:
mode:
authorOri Bernstein <ori@eigenstate.org>2016-02-09 21:23:33 -0800
committerOri Bernstein <ori@eigenstate.org>2016-02-09 21:23:47 -0800
commit5cd0a14dc99289449cd8a3a5bd39fb1bdad21662 (patch)
tree27b07f70b4ea784d05913689a8f6eae0d0d034b9 /lib/std/chartype.myr
parent2b755a0e6bffb0f75f9b0f1433cfe55bd7499606 (diff)
downloadmc-5cd0a14dc99289449cd8a3a5bd39fb1bdad21662.tar.gz
Fix chartype range.
>= base, not > base.
Diffstat (limited to 'lib/std/chartype.myr')
-rw-r--r--lib/std/chartype.myr2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/std/chartype.myr b/lib/std/chartype.myr
index 4185060..0e0b80d 100644
--- a/lib/std/chartype.myr
+++ b/lib/std/chartype.myr
@@ -1235,7 +1235,7 @@ generic charval = {c, base -> @a::(numeric,integral)
v = (c - 'A' + 10) castto(@a::(integral,numeric))
;;
- if v < 0 || v > (base castto(@a::(integral,numeric)))
+ if v < 0 || v >= (base castto(@a::(integral,numeric)))
-> -1
;;
-> v