mirror of
https://github.com/nim-lang/Nim.git
synced 2026-01-06 04:57:49 +00:00
Bugfix for fuzzysearch found by Zevv here: https://irclogs.nim-lang.org/28-09-2018.html#19:43:52
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