Skip to content

Commit 50e8435

Browse files
authored
RandomAccess.Write throws System.IO.IOException Fix (#108380)
1 parent 3ca4ec8 commit 50e8435

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/libraries/System.Private.CoreLib/src/System/IO/RandomAccess.Windows.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -435,7 +435,7 @@ internal static long ReadScatterAtOffset(SafeFileHandle handle, IReadOnlyList<Me
435435
internal static void WriteGatherAtOffset(SafeFileHandle handle, IReadOnlyList<ReadOnlyMemory<byte>> buffers, long fileOffset)
436436
{
437437
// WriteFileGather does not support sync handles, so we just call WriteFile in a loop
438-
int bytesWritten = 0;
438+
long bytesWritten = 0;
439439
int buffersCount = buffers.Count;
440440
for (int i = 0; i < buffersCount; i++)
441441
{

0 commit comments

Comments
 (0)