diff options
author | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2020-11-16 19:12:59 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-11-16 19:12:59 +0000 |
commit | ae73d813970522f5f3de5399ddde0f1f367c9479 (patch) | |
tree | 44e688977cc8bccd39d8aa6a56009889a5342548 /lualib | |
parent | 0daf76ab882d2e2bda63a507e075ca05b59ee7f4 (diff) | |
parent | 68badebdac453aef0f8bc5af96e9a289aefc02e5 (diff) | |
download | rspamd-ae73d813970522f5f3de5399ddde0f1f367c9479.tar.gz rspamd-ae73d813970522f5f3de5399ddde0f1f367c9479.zip |
Merge pull request #3553 from fatalbanana/byte
[Minor] rspamd_text:byte() metamethod
Diffstat (limited to 'lualib')
-rw-r--r-- | lualib/lua_content/pdf.lua | 2 | ||||
-rw-r--r-- | lualib/lua_magic/heuristics.lua | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/lualib/lua_content/pdf.lua b/lualib/lua_content/pdf.lua index 141a07a5f..11d5cab46 100644 --- a/lualib/lua_content/pdf.lua +++ b/lualib/lua_content/pdf.lua @@ -954,7 +954,7 @@ local function attach_pdf_streams(task, input, pdf) end -- Strip the first \n while first < last do - local chr = input:at(first) + local chr = input:byte(first) if chr ~= 13 and chr ~= 10 then break end first = first + 1 end diff --git a/lualib/lua_magic/heuristics.lua b/lualib/lua_magic/heuristics.lua index 6822abe1e..02bc2b4a2 100644 --- a/lualib/lua_magic/heuristics.lua +++ b/lualib/lua_magic/heuristics.lua @@ -181,7 +181,7 @@ local function detect_ole_format(input, log_obj, _, part) end local function process_dir_entry(offset) - local dtype = input:at(offset + 66) + local dtype = input:byte(offset + 66) lua_util.debugm(N, log_obj, "dtype: %s, offset: %s", dtype, offset) if dtype then |