summary refs log tree commit diff
path: root/crypto/src
diff options
context:
space:
mode:
Diffstat (limited to 'crypto/src')
-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;
             }