aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorJack Lloyd <[email protected]>2018-04-08 20:19:17 -0400
committerJack Lloyd <[email protected]>2018-04-08 20:19:17 -0400
commite2202e1ee495053827266a00fe5870a1987ae141 (patch)
treefc069394df2997b5a78f8a59e7a6ccd9502e65e0 /src
parentc792f9f514be46857dbef1edc765b616bc48c5de (diff)
Square is always positive
Diffstat (limited to 'src')
-rw-r--r--src/lib/math/bigint/big_ops2.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/lib/math/bigint/big_ops2.cpp b/src/lib/math/bigint/big_ops2.cpp
index eea6a8590..212a44fa0 100644
--- a/src/lib/math/bigint/big_ops2.cpp
+++ b/src/lib/math/bigint/big_ops2.cpp
@@ -189,6 +189,7 @@ BigInt& BigInt::square(secure_vector<word>& ws)
ws.data(), ws.size());
swap_reg(z);
+ set_sign(BigInt::Positive);
return (*this);
}