1
0
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:
Sébastien Helleu
2014-11-23 08:31:29 +01:00
parent 3fac3b1bf9
commit ae013b7881
+2 -2
View File
@@ -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;
}