summary refs log tree commit diff stats
path: root/lib/impure/re.nim
diff options
context:
space:
mode:
authorAraq <rumpf_a@web.de>2017-02-25 11:18:48 +0100
committerAraq <rumpf_a@web.de>2017-02-25 11:18:48 +0100
commit1961e444c32903d5046f078630e90716c17dff62 (patch)
tree21334eb10390c005f162c6a821bd03d91f1e8b4b /lib/impure/re.nim
parent667acb06a53a47f47dde29c381df0d4bcbf61b94 (diff)
parent16aafddee598da750dba378cca5bea0126fdf992 (diff)
downloadNim-1961e444c32903d5046f078630e90716c17dff62.tar.gz
Merge branch 'devel' into feature/async-streams
Diffstat (limited to 'lib/impure/re.nim')
-rw-r--r--lib/impure/re.nim2
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]