diff --git a/src/library/Syroot.Worms/Shims/System.IO.Stream.cs b/src/library/Syroot.Worms/Shims/System.IO.Stream.cs index febd22e..475761d 100644 --- a/src/library/Syroot.Worms/Shims/System.IO.Stream.cs +++ b/src/library/Syroot.Worms/Shims/System.IO.Stream.cs @@ -22,7 +22,7 @@ namespace System.IO public static int Read(this Stream stream, Span buffer) { 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); return bytesRead; }