Skip to content

Commit

Permalink
Fix regression in RepeatParser
Browse files Browse the repository at this point in the history
  • Loading branch information
cwensley committed Oct 3, 2013
1 parent 1ef5230 commit 02bc71d
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions Eto.Parse/Parsers/RepeatParser.cs
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,7 @@ protected override int InnerParse(ParseArgs args)
{
while (count < Maximum)
{
int curPos = scanner.Position;
if (Until != null && count >= Minimum)
{
int stopMatch;
Expand All @@ -100,7 +101,7 @@ protected override int InnerParse(ParseArgs args)
if (CaptureUntil)
length += stopMatch;
else if (!SkipUntil)
scanner.Position = pos + length;
scanner.Position = curPos;
return length;
}
}
Expand All @@ -123,7 +124,7 @@ protected override int InnerParse(ParseArgs args)
else
{
if (sepMatch > 0)
scanner.Position = pos + length;
scanner.Position = curPos;
break;
}

Expand Down Expand Up @@ -169,7 +170,7 @@ protected override int InnerParse(ParseArgs args)
{
if (sepMatch > 0)
length += sepMatch;
length ++;
length++;
count++;
}
else
Expand Down

0 comments on commit 02bc71d

Please sign in to comment.