summaryrefslogtreecommitdiff
path: root/regex.c
diff options
context:
space:
mode:
Diffstat (limited to 'regex.c')
-rw-r--r--regex.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/regex.c b/regex.c
index 685e767c10..27f1b56878 100644
--- a/regex.c
+++ b/regex.c
@@ -3396,7 +3396,7 @@ re_match(bufp, string_arg, size, pos, regs)
#ifdef SWITCH_ENUM_BUG
switch ((int)((enum regexpcode)*p++))
#else
- switch ((enum regexpcode)*p++)
+ switch ((enum regexpcode)*p++)
#endif
{
@@ -4019,7 +4019,7 @@ re_match(bufp, string_arg, size, pos, regs)
/* If this failure point is from a dummy_failure_point, just
skip it. */
- if (stackp[-3] == 0) {
+ if (stackp[-3] == 0 || (best_regs_set && stackp[-1] == 1)) {
POP_FAILURE_POINT();
goto fail;
}