mirror of
https://github.com/Readarr/Readarr
synced 2026-02-13 18:22:59 +01:00
Fixed: Return sensible value from Levenshtein when distance too large
This commit is contained in:
parent
2bfc50b59b
commit
000022a927
1 changed files with 1 additions and 1 deletions
|
|
@ -217,7 +217,7 @@ public static int GetDistance(char[] target, char[] pattern, int limit = 20)
|
|||
if (distance > limit)
|
||||
{
|
||||
/* More than we wanted. Give up right away */
|
||||
return int.MaxValue;
|
||||
return Math.Max(target.Length, pattern.Length);
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
|
|||
Loading…
Reference in a new issue