diff options
author | Peter Dettman <peter.dettman@bouncycastle.org> | 2013-12-03 10:20:23 +0700 |
---|---|---|
committer | Peter Dettman <peter.dettman@bouncycastle.org> | 2013-12-03 10:20:23 +0700 |
commit | 9f1d8353ae8d4a989b109a091e31a067d5a9c204 (patch) | |
tree | 123e4d4f77262fb252263db6a5b976490b20f77e /crypto | |
parent | Use 1/n-1 record splitting instead of 0/n (diff) | |
download | BouncyCastle.NET-ed25519-9f1d8353ae8d4a989b109a091e31a067d5a9c204.tar.xz |
Always apply sign guard
Diffstat (limited to 'crypto')
-rw-r--r-- | crypto/src/math/BigInteger.cs | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/crypto/src/math/BigInteger.cs b/crypto/src/math/BigInteger.cs index 00f8f399d..3b8a820d7 100644 --- a/crypto/src/math/BigInteger.cs +++ b/crypto/src/math/BigInteger.cs @@ -1678,11 +1678,11 @@ namespace Org.BouncyCastle.Math bitsCorrect <<= 1; } while (bitsCorrect < pow); + } - if (x.sign < 0) - { - x = x.Add(m); - } + if (x.sign < 0) + { + x = x.Add(m); } return x; |