Add context to loadstring calls

This commit is contained in:
Aussiemon 2023-01-18 11:21:13 -07:00
parent 81276b000c
commit ef17beee8b

View file

@ -62,7 +62,7 @@ local function read_or_execute(file_path, args, return_type)
-- Either execute the data or leave it unmodified
if return_type == "exec_result" or return_type == "exec_boolean" then
local func = loadstring(result)
local func = loadstring(result, file_path)
result = func(args)
end
end