diff options
author | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2020-10-30 12:09:00 +0000 |
---|---|---|
committer | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2020-10-30 12:09:00 +0000 |
commit | 2bbf8bb78e8e9d5566d1c1b4812cf6a8258033ef (patch) | |
tree | 9f771aff7c7b1f444b3b27e1d06b2493eba51f35 /lualib/lua_mime.lua | |
parent | 01dae7c1959ce6297d3eb47256b43f5811b0e21d (diff) | |
download | rspamd-2bbf8bb78e8e9d5566d1c1b4812cf6a8258033ef.tar.gz rspamd-2bbf8bb78e8e9d5566d1c1b4812cf6a8258033ef.zip |
[Minor] Lua_mime: One more offset fix
Diffstat (limited to 'lualib/lua_mime.lua')
-rw-r--r-- | lualib/lua_mime.lua | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lualib/lua_mime.lua b/lualib/lua_mime.lua index aab61cb77..76e3c6195 100644 --- a/lualib/lua_mime.lua +++ b/lualib/lua_mime.lua @@ -354,7 +354,7 @@ local function do_replacement (task, part, mp, replacements, local fragments = {} for _,m in ipairs(matches_flattened) do if m[1][1] > cur_start then - fragments[#fragments + 1] = content:span(cur_start, m[1][1] - cur_start) + fragments[#fragments + 1] = content:sub(cur_start, m[1][1]) fragments[#fragments + 1] = replacements[m[2]] cur_start = m[1][2] + 1 -- end of match end |