Skip to content

Commit 694fc7f

Browse files
committed
Fix list shifting error in ReduceTextSpans
1 parent 7c45628 commit 694fc7f

1 file changed

Lines changed: 1 addition & 9 deletions

File tree

StyleCop.Analyzers/StyleCop.Analyzers/SpacingRules/SA1027UseTabsCorrectly.cs

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -246,15 +246,7 @@ private static void ReduceTextSpans(ImmutableArray<TextSpan>.Builder sortedTextS
246246
{
247247
// Increment currentIndex this iteration
248248
currentIndex++;
249-
250-
// Only increment nextIndex this iteration if necessary to ensure nextIndex > currentIndex on the
251-
// next iteration. At this point we already incremented currentIndex, but haven't incremented
252-
// nextIndex.
253-
if (currentIndex > nextIndex)
254-
{
255-
nextIndex--;
256-
}
257-
249+
sortedTextSpans[currentIndex] = next;
258250
continue;
259251
}
260252

0 commit comments

Comments
 (0)