]> source.dussan.org Git - rspamd.git/commitdiff
[Minor] Fix alien userdata printing
authorVsevolod Stakhov <vsevolod@highsecure.ru>
Tue, 26 Mar 2019 12:36:19 +0000 (12:36 +0000)
committerVsevolod Stakhov <vsevolod@highsecure.ru>
Tue, 26 Mar 2019 12:36:19 +0000 (12:36 +0000)
src/lua/lua_logger.c

index abfc3e1fa85b08154688296c9a94802b659981c4..20b59efa7de89755672ae863b3028c42cfb37a65 100644 (file)
@@ -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) {