commit 9378b97: [Minor] Lua_html: Fix traversing to the top-most parent

Vsevolod Stakhov vsevolod at highsecure.ru
Thu Feb 21 12:07:03 UTC 2019


Author: Vsevolod Stakhov
Date: 2019-02-21 12:01:15 +0000
URL: https://github.com/rspamd/rspamd/commit/9378b9748132e1ba5dd65805de955603c7b9118d

[Minor] Lua_html: Fix traversing to the top-most parent

---
 src/lua/lua_html.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/src/lua/lua_html.c b/src/lua/lua_html.c
index 739776b01..63839c286 100644
--- a/src/lua/lua_html.c
+++ b/src/lua/lua_html.c
@@ -594,6 +594,9 @@ lua_html_tag_get_parent (lua_State *L)
 			*ptag = node->data;
 			rspamd_lua_setclass (L, "rspamd{html_tag}", -1);
 		}
+		else {
+			lua_pushnil (L);
+		}
 	}
 	else {
 		return luaL_error (L, "invalid arguments");


More information about the Commits mailing list