]> source.dussan.org Git - rspamd.git/commitdiff
[Minor] Lua_mime: One more off-by-one
authorVsevolod Stakhov <vsevolod@highsecure.ru>
Fri, 30 Oct 2020 19:06:19 +0000 (19:06 +0000)
committerVsevolod Stakhov <vsevolod@highsecure.ru>
Fri, 30 Oct 2020 19:06:19 +0000 (19:06 +0000)
lualib/lua_mime.lua

index 0019d7622cbd8790a370506358695bd4802e17f7..8d52488afeffc4013f90ece9669a48d897ad6619 100644 (file)
@@ -356,7 +356,7 @@ local function do_replacement (task, part, mp, replacements,
       if m[1][1] >= cur_start then
         fragments[#fragments + 1] = content:sub(cur_start, m[1][1] - 1)
         fragments[#fragments + 1] = replacements[m[2]]
-        cur_start = m[1][2] + 1 -- end of match
+        cur_start = m[1][2] -- end of match
       end
     end