diff options
author | Xavier Leroy <xavier.leroy@inria.fr> | 2003-01-02 09:14:35 +0000 |
---|---|---|
committer | Xavier Leroy <xavier.leroy@inria.fr> | 2003-01-02 09:14:35 +0000 |
commit | 1b6668ad080236dfa38577f3051933b09fee9ab5 (patch) | |
tree | 718c5a86e2381d3fb9edd6bd3c7ead23418fa65e /otherlibs/str | |
parent | 4ebd6d1d127659df584540a64d6df538ff07038b (diff) |
Bug dans le 'undo' de ENDGROUP
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@5361 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
Diffstat (limited to 'otherlibs/str')
-rw-r--r-- | otherlibs/str/strstubs.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/otherlibs/str/strstubs.c b/otherlibs/str/strstubs.c index c981a6340..0b518dcbe 100644 --- a/otherlibs/str/strstubs.c +++ b/otherlibs/str/strstubs.c @@ -36,7 +36,7 @@ union backtrack_point { #define Set_tag(p) ((value *) ((long)(p) | 1)) #define Clear_tag(p) ((value *) ((long)(p) & ~1)) -#define Test_tag(p) ((long)(p) & 1) +#define Tag_is_set(p) ((long)(p) & 1) #define BACKTRACK_STACK_BLOCK_SIZE 500 @@ -223,7 +223,7 @@ static int re_match(value re, int group_no = Arg(instr); struct re_group * group = &(re_group[group_no]); back.undo.loc = &(group->end); - back.undo.val = group->start; + back.undo.val = group->end; group->end = txt; goto push; } @@ -318,7 +318,7 @@ static int re_match(value re, sp = stack->point + BACKTRACK_STACK_BLOCK_SIZE; } sp--; - if (Test_tag(sp->pos.pc)) { + if (Tag_is_set(sp->pos.pc)) { pc = Clear_tag(sp->pos.pc); txt = sp->pos.txt; break; |