Fix infinite loop in findAll

This commit is contained in:
def
2015-04-09 17:22:44 +02:00
parent ce0c4a8b58
commit 69d38f82a5

View File

@@ -231,6 +231,7 @@ iterator findAll*(s: string, pattern: Regex, start = 0): string =
if res < 0'i32: break
let a = rawMatches[0]
let b = rawMatches[1]
if a == b and a == i: break
yield substr(s, int(a), int(b)-1)
i = b