summary refs log tree commit diff
path: root/crypto/src
diff options
context:
space:
mode:
authorPeter Dettman <peter.dettman@bouncycastle.org>2021-07-25 15:28:56 +0700
committerPeter Dettman <peter.dettman@bouncycastle.org>2021-07-25 15:28:56 +0700
commitb4aef72b238c1b655594c59ec7d1f42ef5d58676 (patch)
treed82e13a439898f02427ef65839632afa9d78548e /crypto/src
parentOnly GetSessionToResume if pre-1.3 offered (diff)
downloadBouncyCastle.NET-ed25519-b4aef72b238c1b655594c59ec7d1f42ef5d58676.tar.xz
Fix Truncate method
Diffstat (limited to 'crypto/src')
-rw-r--r--crypto/src/tls/TlsUtilities.cs2
1 files changed, 1 insertions, 1 deletions
diff --git a/crypto/src/tls/TlsUtilities.cs b/crypto/src/tls/TlsUtilities.cs
index 9a8665cf5..252c385e1 100644
--- a/crypto/src/tls/TlsUtilities.cs
+++ b/crypto/src/tls/TlsUtilities.cs
@@ -4647,7 +4647,7 @@ namespace Org.BouncyCastle.Tls
 
         internal static short[] Truncate(short[] a, int n)
         {
-            if (n < a.Length)
+            if (n >= a.Length)
                 return a;
 
             short[] t = new short[n];