summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--big.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/big.c b/big.c
index 8a563e7..e77709c 100644
--- a/big.c
+++ b/big.c
@@ -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 */