From 1de387c2177c668d356d7b567cf82e53a92f582c Mon Sep 17 00:00:00 2001 From: "K.Kosako" Date: Wed, 20 Mar 2019 12:42:31 +0900 Subject: [PATCH] clear onig value in regcomp() (POSIX API) --- src/regposix.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/regposix.c b/src/regposix.c index 67e70b9..09e16ac 100644 --- a/src/regposix.c +++ b/src/regposix.c @@ -149,6 +149,8 @@ regcomp(regex_t* reg, const char* pattern, int posix_options) OnigSyntaxType* syntax = OnigDefaultSyntax; OnigOptionType options; + reg->onig = (void* )0; + if ((posix_options & REG_EXTENDED) == 0) syntax = ONIG_SYNTAX_POSIX_BASIC; -- 2.50.1