summary refs log tree commit diff
path: root/crypto/test
diff options
context:
space:
mode:
authorPeter Dettman <peter.dettman@bouncycastle.org>2022-06-30 11:15:39 +0700
committerPeter Dettman <peter.dettman@bouncycastle.org>2022-06-30 11:15:39 +0700
commit633b1a5da2e9ad5323397616dbee05b3d7de5739 (patch)
tree5048f252d70c5fceea0ffbde04afbd3ad9ec7539 /crypto/test
parentNull tmpBuffers when disposing (diff)
downloadBouncyCastle.NET-ed25519-633b1a5da2e9ad5323397616dbee05b3d7de5739.tar.xz
Refactoring around MemoryStream
Diffstat (limited to 'crypto/test')
-rw-r--r--crypto/test/src/tls/test/PipedStream.cs4
1 files changed, 2 insertions, 2 deletions
diff --git a/crypto/test/src/tls/test/PipedStream.cs b/crypto/test/src/tls/test/PipedStream.cs
index 6de5703e1..dfca35b81 100644
--- a/crypto/test/src/tls/test/PipedStream.cs
+++ b/crypto/test/src/tls/test/PipedStream.cs
@@ -80,7 +80,7 @@ namespace Org.BouncyCastle.Tls.Tests
             lock (m_other)
             {
                 WaitForData();
-                int len = (int)System.Math.Min(count, m_other.m_buf.Position - m_readPos);
+                int len = System.Math.Min(count, Convert.ToInt32(m_other.m_buf.Position - m_readPos));
                 Array.Copy(m_other.m_buf.GetBuffer(), m_readPos, buffer, offset, len);
                 m_readPos += len;
                 return len;
@@ -92,7 +92,7 @@ namespace Org.BouncyCastle.Tls.Tests
             lock (m_other)
             {
                 WaitForData();
-                bool eof = (m_readPos >= m_other.m_buf.Position);
+                bool eof = m_readPos >= m_other.m_buf.Position;
                 return eof ? -1 : m_other.m_buf.GetBuffer()[m_readPos++];
             }
         }