mirror of
https://github.com/beefytech/Beef.git
synced 2025-06-10 12:32:20 +02:00
32-bit read fix
This commit is contained in:
parent
48d45abc47
commit
6703cd18ee
1 changed files with 3 additions and 3 deletions
|
@ -68,7 +68,7 @@ namespace System.IO
|
|||
|
||||
public override Result<int> TryRead(Span<uint8> data)
|
||||
{
|
||||
int spaceLeft = (.)(mBufferEnd - mPos);
|
||||
int64 spaceLeft = (.)(mBufferEnd - mPos);
|
||||
if (mPos < mBufferPos)
|
||||
spaceLeft = 0;
|
||||
if (data.Length <= spaceLeft)
|
||||
|
@ -83,9 +83,9 @@ namespace System.IO
|
|||
var data;
|
||||
if (spaceLeft > 0)
|
||||
{
|
||||
Internal.MemCpy(data.Ptr, mBuffer.Ptr + (mPos - mBufferPos), spaceLeft);
|
||||
Internal.MemCpy(data.Ptr, mBuffer.Ptr + (mPos - mBufferPos), (.)spaceLeft);
|
||||
mPos += spaceLeft;
|
||||
data.RemoveFromStart(spaceLeft);
|
||||
data.RemoveFromStart((.)spaceLeft);
|
||||
}
|
||||
|
||||
if (mWriteDirtyPos >= 0)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue