Fix infinite loop in findAll
This commit is contained in:
parent
ce0c4a8b58
commit
69d38f82a5
1 changed files with 1 additions and 0 deletions
|
|
@ -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
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue