Skip to content

Commit

Permalink
[Minor] Fix checks safety
Browse files Browse the repository at this point in the history
  • Loading branch information
vstakhov committed Jul 19, 2021
1 parent 04616a9 commit dde092e
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions rules/html.lua
Expand Up @@ -214,10 +214,12 @@ local vis_check_id = rspamd_config:register_symbol{
local tr = transp_len / (normal_len + transp_len)
if tr > transp_rate then
transp_rate = tr
if not bl.color then bl.color = {0, 0, 0} end
if not bl.bgcolor then bl.bgcolor = {0, 0, 0} end
arg = string.format('%s color #%x%x%x bgcolor #%x%x%x',
tag:get_type(),
bl.color[1] or 0, bl.color[2] or 0, bl.color[3] or 0,
bl.bgcolor[1] or 0, bl.bgcolor[2] or 0, bl.bgcolor[3] or 0)
bl.color[1], bl.color[2], bl.color[3],
bl.bgcolor[1], bl.bgcolor[2], bl.bgcolor[3])
end
end
end
Expand Down

0 comments on commit dde092e

Please sign in to comment.