shithub: mc

Download patch

ref: 5cd0a14dc99289449cd8a3a5bd39fb1bdad21662
parent: 2b755a0e6bffb0f75f9b0f1433cfe55bd7499606
author: Ori Bernstein <ori@eigenstate.org>
date: Tue Feb 9 16:23:33 EST 2016

Fix chartype range.

	>= base, not > base.

--- a/lib/std/chartype.myr
+++ b/lib/std/chartype.myr
@@ -1235,7 +1235,7 @@
 		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