diff options
Diffstat (limited to 'big.c')
-rw-r--r-- | big.c | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -809,10 +809,10 @@ word bigoscan(char *p, char *q) return r; } -word digitval(c) -char c; +/* TODO: this assumes ASCII/UTF-8 */ +word digitval(char c) { - return isdigit(c) ? c - '0' : isupper(c) ? 10 + c - 'A' : 10 + c - 'a'; + return isdigit(c) ? c - '0' : 10 + tolower(c) - 'a'; } word strtobig(z, base) /* numeral (as Miranda string) to big number */ |