tompazourek / NaturalSort.Extension

🔀 Extension method for StringComparison that adds support for natural sorting (e.g. "abc1", "abc2", "abc10" instead of "abc1", "abc10", "abc2").
MIT License
169 stars 13 forks source link

OrdinalIgnoreCase comparison infinite loop in v2.2.0 #4

Closed El-Gor-do closed 4 years ago

El-Gor-do commented 4 years ago

In v2.2.0, this comparison appears to get stuck in an infinite loop whereas v2.1.0 handles it without any problems.

StringComparer.OrdinalIgnoreCase.WithNaturalSort().Compare("abc", "Abc")

tompazourek commented 4 years ago

Thanks for the report, it's weird that the tests didn't catch this. I'll check it out.

tompazourek commented 4 years ago

I fixed the bug and released it in 2.2.1.

I'm still waiting until NuGet validates/indexes the package I uploaded, it usually takes a few minutes.

It should be here when it's done: https://www.nuget.org/packages/NaturalSort.Extension/2.2.1

Thanks again! Sorry for the trouble.

El-Gor-do commented 4 years ago

Thanks, that was quick!