gint what = 0, pos = 3;
if (task) {
- if (lua_isstring (L, 2)) {
+ if (lua_isstring (L, 2) || lua_isnumber (L, 2)) {
/* Get what value */
what = lua_task_str_to_get_type (L, 2);
}
g_ptr_array_set_size (ptrs, 0);
for (lua_pushnil (L); lua_next (L, -2); lua_pop (L, 1)) {
- if (lua_import_email_address (L, task, -1, &addr)) {
+ if (lua_import_email_address (L, task, lua_gettop (L), &addr)) {
g_ptr_array_add (ptrs, addr);
addr = NULL;
}
gint what = 0, pos = 3;
if (task) {
- if (lua_isstring (L, 2)) {
+ if (lua_isstring (L, 2) || lua_isnumber (L, 2)) {
/* Get what value */
what = lua_task_str_to_get_type (L, 2);
}
const gboolean add_name)
{
struct rspamd_metric_result *metric_res;
- struct rspamd_symbol_result *s;
+ struct rspamd_symbol_result *s = NULL;
gint j, e;
if (!symbol_result) {