Hexidecimal numbers are now properly read
This commit is contained in:
parent
7a0ed247e2
commit
4f37715a8c
@ -67,9 +67,9 @@ func runeToDigit (char rune, radix uint64) (digit uint64, worked bool) {
|
|||||||
if char >= '0' && char <= '9' {
|
if char >= '0' && char <= '9' {
|
||||||
digit = uint64(char - '0')
|
digit = uint64(char - '0')
|
||||||
} else if char >= 'A' && char <= 'F' {
|
} else if char >= 'A' && char <= 'F' {
|
||||||
digit = uint64(char - 'A' + 9)
|
digit = uint64(char - 'A' + 10)
|
||||||
} else if char >= 'a' && char <= 'f' {
|
} else if char >= 'a' && char <= 'f' {
|
||||||
digit = uint64(char - 'a' + 9)
|
digit = uint64(char - 'a' + 10)
|
||||||
} else {
|
} else {
|
||||||
worked = false
|
worked = false
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user