diff options
author | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2019-03-26 12:36:19 +0000 |
---|---|---|
committer | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2019-03-26 12:36:19 +0000 |
commit | cc3859371db71e6c1d4d8b89a51201fd66be5329 (patch) | |
tree | ebe01aa64d697249eca7b1250e78ff3dace43d9c | |
parent | 2b72876639e888b8dddbffbcb67c94fb5c0acb5c (diff) | |
download | rspamd-cc3859371db71e6c1d4d8b89a51201fd66be5329.tar.gz rspamd-cc3859371db71e6c1d4d8b89a51201fd66be5329.zip |
[Minor] Fix alien userdata printing
-rw-r--r-- | src/lua/lua_logger.c | 10 |
1 files changed, 4 insertions, 6 deletions
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) { |