mirror of
https://github.com/weechat/weechat.git
synced 2026-06-27 05:16:38 +02:00
core: fix regex replace in eval_expression when regex or regex_replace is empty
This commit is contained in:
+2
-2
@@ -1080,7 +1080,7 @@ eval_expression (const char *expr, struct t_hashtable *pointers,
|
||||
|
||||
/* check for regex */
|
||||
ptr_value = hashtable_get (options, "regex");
|
||||
if (ptr_value && ptr_value[0])
|
||||
if (ptr_value)
|
||||
{
|
||||
regex = malloc (sizeof (*regex));
|
||||
if (string_regcomp (regex, ptr_value,
|
||||
@@ -1097,7 +1097,7 @@ eval_expression (const char *expr, struct t_hashtable *pointers,
|
||||
|
||||
/* check for regex replacement (evaluated later) */
|
||||
ptr_value = hashtable_get (options, "regex_replace");
|
||||
if (ptr_value && ptr_value[0])
|
||||
if (ptr_value)
|
||||
{
|
||||
regex_replace = ptr_value;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user