summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--crypto/src/math/ec/Nat.cs2
1 files changed, 1 insertions, 1 deletions
diff --git a/crypto/src/math/ec/Nat.cs b/crypto/src/math/ec/Nat.cs
index 567c2bc00..599d929c2 100644
--- a/crypto/src/math/ec/Nat.cs
+++ b/crypto/src/math/ec/Nat.cs
@@ -135,7 +135,7 @@ namespace Org.BouncyCastle.Math.EC
                 return x[0] & 1;
             }
             int w = bit >> 5;
-            if ((w - Int32.MinValue) > x.Length)
+            if (w < 0 || w >= x.Length)
             {
                 return 0;
             }