Skip to content

Commit 8cf6c40

Browse files
committed
Set stream copy position to beginning
This is a manual port of #12953. The code was refactored in .NET 9 so the fix needs manually applied.
1 parent 6a5c4fc commit 8cf6c40

File tree

1 file changed

+1
-0
lines changed
  • src/System.Drawing.Common/src/System/Drawing/Internal

1 file changed

+1
-0
lines changed

src/System.Drawing.Common/src/System/Drawing/Internal/GPStream.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ internal GPStream(Stream stream, bool makeSeekable = true)
2020
// Copy to a memory stream so we can seek
2121
MemoryStream memoryStream = new MemoryStream();
2222
stream.CopyTo(memoryStream);
23+
memoryStream.Position = 0;
2324
_dataStream = memoryStream;
2425
}
2526
else

0 commit comments

Comments
 (0)