commit cc38593: [Minor] Fix alien userdata printing
Vsevolod Stakhov
vsevolod at highsecure.ru
Tue Mar 26 12:49:03 UTC 2019
Author: Vsevolod Stakhov
Date: 2019-03-26 12:36:19 +0000
URL: https://github.com/rspamd/rspamd/commit/cc3859371db71e6c1d4d8b89a51201fd66be5329
[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) {
More information about the Commits
mailing list