more fixes for the new string behaviour

This commit is contained in:
Andreas Rumpf 2018-04-30 08:53:31 +02:00
commit 5758ebf02c
3 changed files with 12 additions and 14 deletions

View file

@ -606,7 +606,7 @@ proc rawMatch*(s: string, p: Peg, start: int, c: var Captures): int {.
a, b: Rune
result = start
while i < len(p.term):
if i >= s.len:
if result >= s.len:
result = -1
break
fastRuneAt(p.term, i, a)