diff options
Diffstat (limited to 'lib/impure/re.nim')
-rw-r--r-- | lib/impure/re.nim | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/impure/re.nim b/lib/impure/re.nim index 9d5d2bdd0..e00f91de1 100644 --- a/lib/impure/re.nim +++ b/lib/impure/re.nim @@ -290,7 +290,7 @@ proc find*(buf: cstring, pattern: Regex, matches: var openArray[string], for i in 1..int(res)-1: var a = rawMatches[i * 2] var b = rawMatches[i * 2 + 1] - if a >= 0'i32: matches[i-1] = bufSubstr(buf, int(a), int(b)-1) + if a >= 0'i32: matches[i-1] = bufSubstr(buf, int(a), int(b)) else: matches[i-1] = nil return rawMatches[0] |