mirror of
https://gitlab.com/Syroot/Worms.git
synced 2025-01-13 07:18:00 +03:00
Fix StreamShims Read method to not call itself.
This commit is contained in:
parent
03095916f1
commit
6cba058138
@ -22,7 +22,7 @@ namespace System.IO
|
|||||||
public static int Read(this Stream stream, Span<byte> buffer)
|
public static int Read(this Stream stream, Span<byte> buffer)
|
||||||
{
|
{
|
||||||
byte[] bytes = new byte[buffer.Length];
|
byte[] bytes = new byte[buffer.Length];
|
||||||
int bytesRead = stream.Read(bytes);
|
int bytesRead = stream.Read(bytes, 0, bytes.Length);
|
||||||
bytes.AsSpan(0, bytesRead).CopyTo(buffer);
|
bytes.AsSpan(0, bytesRead).CopyTo(buffer);
|
||||||
return bytesRead;
|
return bytesRead;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user