summary refs log tree commit diff stats
path: root/lib/impure
diff options
context:
space:
mode:
authorAnatoly Galiulin <galiulin.anatoly@gmail.com>2017-02-13 19:35:40 +0700
committerAndreas Rumpf <rumpf_a@web.de>2017-02-13 13:35:40 +0100
commit279e4b045133bad59e349520547e5220408b232e (patch)
tree6822020a49e768f30f87b2ea73baa2f8bd399344 /lib/impure
parentac9c2126e60e3890aabf6db20137330b980004df (diff)
downloadNim-279e4b045133bad59e349520547e5220408b232e.tar.gz
Fixes #5382
Diffstat (limited to 'lib/impure')
-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]