mirror of
https://github.com/beefytech/Beef.git
synced 2025-06-08 11:38:21 +02:00
Buffered fix
This commit is contained in:
parent
3756323021
commit
1cb5538317
1 changed files with 2 additions and 0 deletions
|
@ -69,6 +69,8 @@ namespace System.IO
|
|||
public override Result<int> TryRead(Span<uint8> data)
|
||||
{
|
||||
int spaceLeft = (.)(mBufferEnd - mPos);
|
||||
if (mPos < mBufferPos)
|
||||
spaceLeft = 0;
|
||||
if (data.Length <= spaceLeft)
|
||||
{
|
||||
Internal.MemCpy(data.Ptr, mBuffer.Ptr + (mPos - mBufferPos), data.Length);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue