Skip to content

Commit 1c2a83a

Browse files
Set stream copy position to beginning (#12971)
This is a manual port of #12953. The code was refactored in .NET 9 so the fix needs manually applied. ###### Microsoft Reviewers: [Open in CodeFlow](https://microsoft.github.io/open-pr/?codeflow=https://github.com/dotnet/winforms/pull/12971)
2 parents 98f54ff + 8cf6c40 commit 1c2a83a

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)