From e8b03a8f21b170a26a0d3451265fd326d8c85501 Mon Sep 17 00:00:00 2001 From: Vsevolod Stakhov Date: Sat, 20 Sep 2014 22:25:00 +0100 Subject: [PATCH] Push base32 encoded fuzzy. --- src/lua/lua_task.c | 8 ++++++-- 1 file 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; } -- 2.39.5