Skip to content

Commit

Permalink
Revert one optimization
Browse files Browse the repository at this point in the history
Subtle bug in that the entire string is being placed in the set, not the span.
  • Loading branch information
IDisposable committed Jul 29, 2023
1 parent 677d59d commit c8c8801
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ private static AnalysisResults CreateAnalysisResults(
foreach (string s in uniqueStrings)
{
// Get the span for the substring.
ReadOnlySpan<char> substring = s.AsSpan();
ReadOnlySpan<char> substring = count == 0 ? s.AsSpan() : Slicer(s, index, count);

// If the substring isn't ASCII, bail out to return the results.
if (!IsAllAscii(substring))
Expand Down

0 comments on commit c8c8801

Please sign in to comment.