aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorJack Lloyd <[email protected]>2019-08-23 10:49:28 -0400
committerJack Lloyd <[email protected]>2019-08-23 10:49:28 -0400
commit3387f13dc427f1eb9e99149dacffaa33be5f3c02 (patch)
tree51d4e324822661b47bb4effb90937162ab17d628 /src
parent29f835800117779f37f758f07c80f90eb6d31400 (diff)
Fix bad compare in BigInt <<=
Caused an extra allocation for no reason in some cases.
Diffstat (limited to 'src')
-rw-r--r--src/lib/math/bigint/big_ops2.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/lib/math/bigint/big_ops2.cpp b/src/lib/math/bigint/big_ops2.cpp
index 78c868a5d..35e90fb89 100644
--- a/src/lib/math/bigint/big_ops2.cpp
+++ b/src/lib/math/bigint/big_ops2.cpp
@@ -320,7 +320,7 @@ BigInt& BigInt::operator<<=(size_t shift)
const size_t bits_free = top_bits_free();
- const size_t new_size = size + shift_words + (bits_free < shift);
+ const size_t new_size = size + shift_words + (bits_free < shift_bits);
m_data.grow_to(new_size);