diff options
author | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2020-02-24 20:14:25 +0000 |
---|---|---|
committer | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2020-02-24 20:14:25 +0000 |
commit | 1629eb5614c82e4ec3b1d480ee74d01eac0b66fe (patch) | |
tree | 624955bcb0f61765c380dd5ce3c809319794060d /src/lua | |
parent | 5456e25df0d4303f0e14b84e0a090d1fae746f49 (diff) | |
download | rspamd-1629eb5614c82e4ec3b1d480ee74d01eac0b66fe.tar.gz rspamd-1629eb5614c82e4ec3b1d480ee74d01eac0b66fe.zip |
[Minor] Fix null logging object in the logger
Diffstat (limited to 'src/lua')
-rw-r--r-- | src/lua/lua_logger.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/lua/lua_logger.c b/src/lua/lua_logger.c index ccf6087de..fc0f5fe9f 100644 --- a/src/lua/lua_logger.c +++ b/src/lua/lua_logger.c @@ -949,9 +949,12 @@ lua_logger_logx (lua_State *L) if (lua_type (L, 3) == LUA_TSTRING) { uid = luaL_checkstring (L, 3); } - else { + else if (lua_type (L, 3) == LUA_TUSERDATA) { uid = lua_logger_get_id (L, 3, NULL); } + else { + uid = "???"; + } if (uid && modname) { if (lua_type (L, 4) == LUA_TSTRING) { |