summaryrefslogtreecommitdiff
path: root/source
diff options
context:
space:
mode:
Diffstat (limited to 'source')
-rw-r--r--source/kit/bigint.h7
1 files changed, 2 insertions, 5 deletions
diff --git a/source/kit/bigint.h b/source/kit/bigint.h
index 41d19e6..0347108 100644
--- a/source/kit/bigint.h
+++ b/source/kit/bigint.h
@@ -513,7 +513,7 @@ static kit_bigint_t kit_bi_from_base32(kit_str_t base32) {
return z;
}
-static u8 KIT_BASE58_DIGITS[] = {
+static u8 KIT_BASE58_DIGITS[256] = {
['1'] = 0, ['2'] = 1, ['3'] = 2, ['4'] = 3, ['5'] = 4,
['6'] = 5, ['7'] = 6, ['8'] = 7, ['9'] = 8, ['A'] = 9,
['B'] = 10, ['C'] = 11, ['D'] = 12, ['E'] = 13, ['F'] = 14,
@@ -529,12 +529,9 @@ static u8 KIT_BASE58_DIGITS[] = {
};
static u8 kit_base58_digit(c8 c) {
- assert(c >= '\0' && c < (c8) sizeof KIT_BASE58_DIGITS);
assert(c == '1' || KIT_BASE58_DIGITS[(size_t) (u8) c] != 0);
- return c >= '\0' && c < (c8) sizeof KIT_BASE58_DIGITS
- ? KIT_BASE58_DIGITS[(size_t) (u8) c]
- : 0;
+ return KIT_BASE58_DIGITS[(size_t) (u8) c];
}
static kit_bigint_t kit_bi_from_base58(kit_str_t base58) {