[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: A bug in lpeg-0.5
- From: roberto@... (Roberto Ierusalimschy)
- Date: Thu, 22 Mar 2007 09:58:54 -0300
> Here's a bug that I found in lpeg-0.5... compare the two transcripts
> below, the output "foo>" is wrong.
>
> [...]
Many thanks for the feedback. Follows the patch:
@@ -467,7 +467,7 @@
assert(captop > 0);
if (capture[captop - 1].siz == 0 &&
s - capture[captop - 1].s < UCHAR_MAX) {
- capture[captop - 1].siz = s - capture[captop - 1].s + 1;
+ capture[captop - 1].siz = (s - getoff(p)) - capture[captop - 1].s + 1;
p++;
continue;
}
-- Roberto