openbsd-ports/devel/lpeg/patches/patch-lpeg_c

13 lines
523 B
Plaintext

$OpenBSD: patch-lpeg_c,v 1.1.1.1 2007/03/26 13:03:57 jolan Exp $
--- lpeg.c.orig Wed Mar 21 16:48:17 2007
+++ lpeg.c Mon Mar 26 03:43:38 2007
@@ -467,7 +467,7 @@ static const char *match (lua_State *L,
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;
}