From: Vsevolod Stakhov Date: Tue, 26 Mar 2019 12:36:19 +0000 (+0000) Subject: [Minor] Fix alien userdata printing X-Git-Tag: 1.9.1~46 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=cc3859371db71e6c1d4d8b89a51201fd66be5329;p=rspamd.git [Minor] Fix alien userdata printing --- diff --git a/src/lua/lua_logger.c b/src/lua/lua_logger.c index abfc3e1fa..20b59efa7 100644 --- a/src/lua/lua_logger.c +++ b/src/lua/lua_logger.c @@ -357,16 +357,14 @@ lua_logger_out_userdata (lua_State *L, gint pos, gchar *outbuf, gsize len, } } else { + lua_pop (L, 1); lua_pushstring (L, "class"); lua_gettable (L, -2); - if (!lua_isstring (L, -1)) { - lua_settop (L, top); - - return 0; + if (lua_isstring (L, -1)) { + str = lua_tostring (L, -1); + converted_to_str = TRUE; } - - str = lua_tostring (L, -1); } if (converted_to_str) {