aboutsummaryrefslogtreecommitdiffstats
path: root/src/math
diff options
context:
space:
mode:
Diffstat (limited to 'src/math')
-rw-r--r--src/math/bigint/big_code.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/math/bigint/big_code.cpp b/src/math/bigint/big_code.cpp
index 75a310a7c..28614c9f1 100644
--- a/src/math/bigint/big_code.cpp
+++ b/src/math/bigint/big_code.cpp
@@ -111,7 +111,9 @@ BigInt BigInt::decode(const byte buf[], size_t length, Base base)
if(length % 2)
{
// Handle lack of leading 0
- const char buf0_with_leading_0[2] = { '0', buf[0] };
+ const char buf0_with_leading_0[2] =
+ { '0', static_cast<char>(buf[0]) };
+
binary = hex_decode(buf0_with_leading_0, 2);
binary += hex_decode(reinterpret_cast<const char*>(&buf[1]),