Skip to content

Commit

Permalink
fix: 调用 Read 时无法正确处理缓冲区中的数据
Browse files Browse the repository at this point in the history
  • Loading branch information
SALTWOOD committed Aug 13, 2024
1 parent c8836e0 commit a884f80
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Network/RsaStream.cs
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ public override int Read(byte[] buffer, int offset, int count)
{
int actualSize = Math.Min(this.pendingBytes.Length, count);
(byte[] temp, this.pendingBytes) = (this.pendingBytes[0..actualSize], this.pendingBytes[actualSize..]);
Array.Copy(temp, 0, buffer, offset, count);
Array.Copy(temp, 0, buffer, offset, actualSize);
return actualSize;
}

Expand Down

0 comments on commit a884f80

Please sign in to comment.