mirror of
https://github.com/irssi/irssi.git
synced 2026-08-17 07:32:04 +02:00
Use the RAW flag when building the regexps.
Also, plugged a memory leak when retrieving the match position.
This commit is contained in:
parent
5eaead761f
commit
5dcf291f21
3 changed files with 16 additions and 13 deletions
|
|
@ -328,7 +328,7 @@ static void ignore_init_rec(IGNORE_REC *rec)
|
|||
if (rec->regexp && rec->pattern != NULL) {
|
||||
GError *re_error;
|
||||
|
||||
rec->preg = g_regex_new(rec->pattern, G_REGEX_CASELESS, 0, &re_error);
|
||||
rec->preg = g_regex_new(rec->pattern, G_REGEX_OPTIMIZE | G_REGEX_RAW | G_REGEX_CASELESS, 0, &re_error);
|
||||
|
||||
if (rec->preg == NULL) {
|
||||
g_warning("Failed to compile regexp '%s': %s", rec->pattern, re_error->message);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue