mirror of
https://github.com/nim-lang/Nim.git
synced 2026-02-17 08:34:20 +00:00
Merge pull request #9112 from rayman22201/dockhack-fuzzy-match-bugfix
Bugfix for fuzzysearch found by Zevv
This commit is contained in:
@@ -86,7 +86,7 @@ proc fuzzyMatch*(pattern, str: cstring) : tuple[score: int, matched: bool] =
|
||||
score += ord(LeadingCharMatch)
|
||||
|
||||
var onBoundary = (patIndex == high(pattern))
|
||||
if not onBoundary:
|
||||
if not onBoundary and strIndex < high(str):
|
||||
let
|
||||
nextPatternChar = toLowerAscii(pattern[patIndex + 1])
|
||||
nextStrChar = toLowerAscii(str[strIndex + 1])
|
||||
|
||||
Reference in New Issue
Block a user