summaryrefslogtreecommitdiff
path: root/regcomp.c
diff options
context:
space:
mode:
Diffstat (limited to 'regcomp.c')
-rw-r--r--regcomp.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/regcomp.c b/regcomp.c
index 8d66f387ab..38bf387975 100644
--- a/regcomp.c
+++ b/regcomp.c
@@ -1135,8 +1135,11 @@ reg(I32 paren, I32 *flagp)
break;
default:
--regparse;
- while (*regparse && strchr("iogcmsx", *regparse))
- pmflag(&regflags, *regparse++);
+ while (*regparse && strchr("iogcmsx", *regparse)) {
+ if (*regparse != 'o')
+ pmflag(&regflags, *regparse);
+ ++regparse;
+ }
unknown:
if (*regparse != ')')
FAIL2("Sequence (?%c...) not recognized", *regparse);