Browse Source

LibCrypto: Replace incorrect operator in SignedBigInteger::bitwise_and

Gal Horowitz 4 năm trước cách đây
mục cha
commit
3872c31b08

+ 1 - 1
Userland/Libraries/LibCrypto/BigInt/SignedBigInteger.cpp

@@ -166,7 +166,7 @@ FLATTEN SignedBigInteger SignedBigInteger::bitwise_and(const SignedBigInteger& o
     auto result = bitwise_and(other.unsigned_value());
     auto result = bitwise_and(other.unsigned_value());
 
 
     // The sign bit will have to be AND'd manually.
     // The sign bit will have to be AND'd manually.
-    result.m_sign = is_negative() || other.is_negative();
+    result.m_sign = is_negative() && other.is_negative();
 
 
     return result;
     return result;
 }
 }