From b4aef72b238c1b655594c59ec7d1f42ef5d58676 Mon Sep 17 00:00:00 2001 From: Peter Dettman Date: Sun, 25 Jul 2021 15:28:56 +0700 Subject: Fix Truncate method --- crypto/src/tls/TlsUtilities.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'crypto/src') 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]; -- cgit 1.5.1