From 4f37715a8cb8505a5a12bff0c7a63776e1103dc5 Mon Sep 17 00:00:00 2001 From: Sasha Koshka Date: Thu, 11 Aug 2022 04:25:56 -0500 Subject: [PATCH] Hexidecimal numbers are now properly read --- lexer/numbers.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lexer/numbers.go b/lexer/numbers.go index a08074b..80d4a91 100644 --- a/lexer/numbers.go +++ b/lexer/numbers.go @@ -67,9 +67,9 @@ func runeToDigit (char rune, radix uint64) (digit uint64, worked bool) { if char >= '0' && char <= '9' { digit = uint64(char - '0') } else if char >= 'A' && char <= 'F' { - digit = uint64(char - 'A' + 9) + digit = uint64(char - 'A' + 10) } else if char >= 'a' && char <= 'f' { - digit = uint64(char - 'a' + 9) + digit = uint64(char - 'a' + 10) } else { worked = false }