diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/lua/lua_task.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/lua/lua_task.c b/src/lua/lua_task.c index 3d1495674..127e6af4a 100644 --- a/src/lua/lua_task.c +++ b/src/lua/lua_task.c @@ -1898,14 +1898,18 @@ static gint lua_textpart_get_fuzzy (lua_State * L) { struct mime_text_part *part = lua_check_textpart (L); + gchar *out; if (part == NULL || part->is_empty) { lua_pushnil (L); return 1; } - lua_pushlstring (L, part->fuzzy->hash_pipe, - sizeof (part->fuzzy->hash_pipe)); + out = rspamd_encode_base32 (part->fuzzy->hash_pipe, + strlen (part->fuzzy->hash_pipe)); + lua_pushstring (L, out); + g_free (out); + return 1; } |