diff options
Diffstat (limited to 'compiler/linter.nim')
-rw-r--r-- | compiler/linter.nim | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/compiler/linter.nim b/compiler/linter.nim index 41ee24fa5..07563ddbb 100644 --- a/compiler/linter.nim +++ b/compiler/linter.nim @@ -72,10 +72,9 @@ proc beautifyName(s: string, k: TSymKind): string = proc differ*(line: string, a, b: int, x: string): string = proc substrEq(s: string, pos, last: int, substr: string): bool = var i = 0 - var length = substr.len - while i < length and pos+i <= last and s[pos+i] == substr[i]: + while i < substr.len and pos+i <= last and s[pos+i] == substr[i]: inc i - return i == length + return i == substr.len let last = min(b, line.len) |