Fixed: Return sensible value from Levenshtein when distance too large

pull/1522/head
ta264 3 years ago
parent 2bfc50b59b
commit 000022a927

@ -217,7 +217,7 @@ namespace NzbDrone.Common.Extensions
if (distance > limit)
{
/* More than we wanted. Give up right away */
return int.MaxValue;
return Math.Max(target.Length, pattern.Length);
}
/*

Loading…
Cancel
Save