From 8736dce71a47f44c5fc62d32287245c4f0e1d790 Mon Sep 17 00:00:00 2001 From: Krishna Vedala <7001608+kvedala@users.noreply.github.com> Date: Mon, 22 Jun 2020 16:21:57 -0400 Subject: [PATCH] make multiplication 64-bit --- math/large_number.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/math/large_number.h b/math/large_number.h index 57154f57b..421d8c303 100644 --- a/math/large_number.h +++ b/math/large_number.h @@ -264,7 +264,7 @@ class large_number { size_t i; uint64_t carry = 0, temp; for (i = 0; i < this->num_digits(); i++) { - temp = (*this)[i] * n; + temp = static_cast((*this)[i]) * n; temp += carry; if (temp < 10) { carry = 0;