diff options
| -rw-r--r-- | text.c | 5 |
1 files changed, 4 insertions, 1 deletions
@@ -1177,7 +1177,10 @@ Regex *text_regex_new(void) { int text_regex_compile(Regex *regex, const char *string, int cflags) { regex->string = string; - return regcomp(®ex->regex, string, cflags); + int r = regcomp(®ex->regex, string, cflags); + if (r) + regcomp(®ex->regex, "\0\0", 0); + return r; } void text_regex_free(Regex *r) { |
