Skip to content

Commit 9c5d0f6

Browse files
committed
Update CrossChunkMatcher.cs
1 parent f584fac commit 9c5d0f6

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/Verify/Serialization/Scrubbers/CrossChunkMatcher.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -68,14 +68,14 @@ public static void ReplaceAll<TContext>(
6868
builder.Overwrite(match.Value, match.Index, match.Length);
6969
}
7070
}
71+
7172
static int FillBuffer(StringBuilder builder, int start, Span<char> buffer)
7273
{
7374
var bufferIndex = 0;
7475
var currentPosition = 0;
7576

7677
foreach (var chunk in builder.GetChunks())
7778
{
78-
var chunkSpan = chunk.Span;
7979
var chunkEnd = currentPosition + chunk.Length;
8080

8181
// Skip chunks before our start position
@@ -92,7 +92,7 @@ static int FillBuffer(StringBuilder builder, int start, Span<char> buffer)
9292
var destinationSlice = buffer[bufferIndex..];
9393
var toCopy = Math.Min(chunk.Length - chunkStart, destinationSlice.Length);
9494

95-
chunkSpan.Slice(chunkStart, toCopy).CopyTo(destinationSlice);
95+
chunk.Span.Slice(chunkStart, toCopy).CopyTo(destinationSlice);
9696
bufferIndex += toCopy;
9797

9898
// If buffer is full, we're done

0 commit comments

Comments
 (0)