diff options
-rw-r--r-- | tools/dochack/fuzzysearch.nim | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/tools/dochack/fuzzysearch.nim b/tools/dochack/fuzzysearch.nim index e6b1ea3cd..69f9fce3c 100644 --- a/tools/dochack/fuzzysearch.nim +++ b/tools/dochack/fuzzysearch.nim @@ -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]) |