fix[protocol]: 修复C#设置写索引的判断错误

This commit is contained in:
jaysunxiao committed 2021-10-13 11:48:54 +08:00
1 parent 118e7590e5
commit 99348ad738
2 files changed
+2 -2

No files matched your search

@@ -58,7 +58,7 @@ namespace CsProtocol.Buffer
public void SetWriteOffset(int writeIndex)
{
if (writeOffset > buffer.Length)
if (writeIndex > buffer.Length)
{
throw new Exception("writeIndex[" + writeIndex + "] out of bounds exception: readerIndex: " + readOffset +
", writerIndex: " + writeOffset +
@@ -56,7 +56,7 @@ namespace CsProtocol.Buffer
public void SetWriteOffset(int writeIndex)
{
if (writeOffset > buffer.Length)
if (writeIndex > buffer.Length)
{
throw new Exception("writeIndex[" + writeIndex + "] out of bounds exception: readerIndex: " + readOffset +
", writerIndex: " + writeOffset +