From cc3859371db71e6c1d4d8b89a51201fd66be5329 Mon Sep 17 00:00:00 2001 From: Vsevolod Stakhov Date: Tue, 26 Mar 2019 12:36:19 +0000 Subject: [PATCH] [Minor] Fix alien userdata printing --- src/lua/lua_logger.c | 10 ++++------ 1 file 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) { -- 2.39.5