aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorJack Lloyd <[email protected]>2018-12-03 06:17:16 -0500
committerJack Lloyd <[email protected]>2018-12-03 06:19:25 -0500
commit1af5efd6093d0d6235c18ebf8f3435b1fcbf6a93 (patch)
tree2d6a3ebb9637103008752fbb6f28db28c5c3bff2 /src
parentdf80fe302dd08f2de74a888cc4ae157f1f2bfa2c (diff)
Fix shift operator
This would continually reallocate to larger sizes which is bad news.
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 d35dc082e..6e858d272 100644
--- a/src/lib/math/bigint/big_ops2.cpp
+++ b/src/lib/math/bigint/big_ops2.cpp
@@ -324,7 +324,7 @@ BigInt& BigInt::operator<<=(size_t shift)
{
const size_t shift_words = shift / BOTAN_MP_WORD_BITS;
const size_t shift_bits = shift % BOTAN_MP_WORD_BITS;
- const size_t words = size();
+ const size_t words = sig_words();
/*
* FIXME - if shift_words == 0 && the top shift_bits of the top word