mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 04:27:43 +00:00
LibCrypto: Replace use of negate() in SignedBigInteger::bitwise_or
Calling negate() on a big integer does not make it negative, but rather flips its sign, so this was not actually acting as an OR.
This commit is contained in:
parent
3f5c9d3edb
commit
38e9e35380
1 changed files with 1 additions and 2 deletions
|
@ -156,8 +156,7 @@ FLATTEN SignedBigInteger SignedBigInteger::bitwise_or(const SignedBigInteger& ot
|
|||
auto result = bitwise_or(other.unsigned_value());
|
||||
|
||||
// The sign bit will have to be OR'd manually.
|
||||
if (other.is_negative())
|
||||
result.negate();
|
||||
result.m_sign = is_negative() || other.is_negative();
|
||||
|
||||
return result;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue