From 9f1d8353ae8d4a989b109a091e31a067d5a9c204 Mon Sep 17 00:00:00 2001 From: Peter Dettman Date: Tue, 3 Dec 2013 10:20:23 +0700 Subject: Always apply sign guard --- crypto/src/math/BigInteger.cs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'crypto/src') 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; -- cgit 1.5.1