summaryrefslogtreecommitdiffstats
path: root/lualib
diff options
context:
space:
mode:
authorAndrew Lewis <nerf@judo.za.org>2020-11-16 20:13:03 +0200
committerAndrew Lewis <nerf@judo.za.org>2020-11-16 20:13:03 +0200
commit68badebdac453aef0f8bc5af96e9a289aefc02e5 (patch)
treeb746ea582bd0e32c8a85af93c264ad2d8158045b /lualib
parent36963c3fa3b053812dbb9abea386b27a78a5d062 (diff)
downloadrspamd-68badebdac453aef0f8bc5af96e9a289aefc02e5.tar.gz
rspamd-68badebdac453aef0f8bc5af96e9a289aefc02e5.zip
[Minor] rspamd_text:byte() metamethod
Diffstat (limited to 'lualib')
-rw-r--r--lualib/lua_content/pdf.lua2
-rw-r--r--lualib/lua_magic/heuristics.lua2
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