diff options
author | Peter Dettman <peter.dettman@bouncycastle.org> | 2022-06-30 11:15:39 +0700 |
---|---|---|
committer | Peter Dettman <peter.dettman@bouncycastle.org> | 2022-06-30 11:15:39 +0700 |
commit | 633b1a5da2e9ad5323397616dbee05b3d7de5739 (patch) | |
tree | 5048f252d70c5fceea0ffbde04afbd3ad9ec7539 /crypto/test | |
parent | Null tmpBuffers when disposing (diff) | |
download | BouncyCastle.NET-ed25519-633b1a5da2e9ad5323397616dbee05b3d7de5739.tar.xz |
Refactoring around MemoryStream
Diffstat (limited to 'crypto/test')
-rw-r--r-- | crypto/test/src/tls/test/PipedStream.cs | 4 |
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++]; } } |