diff options
Diffstat (limited to 'src/regex.c')
| -rw-r--r-- | src/regex.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/regex.c b/src/regex.c index f6720da20ae..02455be179c 100644 --- a/src/regex.c +++ b/src/regex.c @@ -4714,10 +4714,12 @@ regcomp (preg, pattern, cflags) { reg_errcode_t ret; unsigned syntax - = cflags & REG_EXTENDED ? RE_SYNTAX_POSIX_EXTENDED : RE_SYNTAX_POSIX_BASIC; + = (cflags & REG_EXTENDED) ? + RE_SYNTAX_POSIX_EXTENDED : RE_SYNTAX_POSIX_BASIC; /* regex_compile will allocate the space for the compiled pattern. */ preg->buffer = 0; + preg->allocated = 0; /* Don't bother to use a fastmap when searching. This simplifies the REG_NEWLINE case: if we used a fastmap, we'd have to put all the |
