From: Vsevolod Stakhov Date: Fri, 28 May 2021 10:43:31 +0000 (+0100) Subject: [Minor] Lua_html: Restore compatible behaviour of get_extra method X-Git-Tag: 3.0~357 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=339e2ffd33d6953cacfb3bbb35586defb21fa82d;p=thirdparty%2Frspamd.git [Minor] Lua_html: Restore compatible behaviour of get_extra method --- diff --git a/src/lua/lua_html.cxx b/src/lua/lua_html.cxx index 629b4f66f7..30bfa55d61 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(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); }