commit 339e2ff: [Minor] Lua_html: Restore compatible behaviour of get_extra method
Vsevolod Stakhov
vsevolod at highsecure.ru
Fri May 28 10:49:03 UTC 2021
Author: Vsevolod Stakhov
Date: 2021-05-28 11:43:31 +0100
URL: https://github.com/rspamd/rspamd/commit/339e2ffd33d6953cacfb3bbb35586defb21fa82d (HEAD -> master)
[Minor] Lua_html: Restore compatible behaviour of get_extra method
---
src/lua/lua_html.cxx | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/src/lua/lua_html.cxx b/src/lua/lua_html.cxx
index 629b4f66f..30bfa55d6 100644
--- a/src/lua/lua_html.cxx
+++ b/src/lua/lua_html.cxx
@@ -712,14 +712,14 @@ lua_html_tag_get_extra (lua_State *L)
*purl = std::get<struct rspamd_url *>(ltag->tag->extra);
rspamd_lua_setclass (L, "rspamd{url}", -1);
}
- else if (ltag->tag->flags & FL_BLOCK) {
- lua_html_push_block (L, ltag->tag->block);
- }
else {
/* Unknown extra ? */
lua_pushnil (L);
}
}
+ else if (ltag->tag->block != nullptr) {
+ lua_html_push_block (L, ltag->tag->block);
+ }
else {
lua_pushnil (L);
}
More information about the Commits
mailing list