1
0
Fork 0
forked from lthn/blockchain

warning fixed (thanks to @crypto_zoidberg)

This commit is contained in:
sowle 2024-02-23 12:57:09 +01:00
parent c8b52f6e96
commit 5bb31e3282
No known key found for this signature in database
GPG key ID: C07A24B2D89D49FC

View file

@ -245,7 +245,7 @@ namespace crypto
explicit scalar_t(const boost::multiprecision::number<T>& bigint)
{
zero();
unsigned int bytes_to_copy = bigint.backend().size() * bigint.backend().limb_bits / 8;
size_t bytes_to_copy = bigint.backend().size() * bigint.backend().limb_bits / 8;
if (bytes_to_copy > sizeof *this)
bytes_to_copy = sizeof *this;
memcpy(&m_s[0], bigint.backend().limbs(), bytes_to_copy);