mirror of
https://github.com/tiennm99/zfoo.git
synced 2026-10-13 12:15:15 +00:00
fix[protocol]: 修复C#设置写索引的判断错误
This commit is contained in:
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 +
|
||||
|
||||
Reference in new issue
Block a user