From 943313515f385411be5b368744a9278f11c3bc90 Mon Sep 17 00:00:00 2001 From: Aussiemon Date: Wed, 22 Feb 2023 14:05:08 -0700 Subject: [PATCH] Fix loadstring issue --- dmf/scripts/mods/dmf/modules/core/io.lua | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/dmf/scripts/mods/dmf/modules/core/io.lua b/dmf/scripts/mods/dmf/modules/core/io.lua index 1aa046e..13a5880 100644 --- a/dmf/scripts/mods/dmf/modules/core/io.lua +++ b/dmf/scripts/mods/dmf/modules/core/io.lua @@ -7,6 +7,9 @@ if not _io.initialized then _io = dmf.deepcopy(Mods.lua.io) end +-- Local backup of the loadstring function +local _loadstring = Mods.lua.loadstring + local _mod_directory = "./../mods" -- ##################################################################################################################### @@ -62,7 +65,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, file_path) + local func = _loadstring(result, file_path) result = func(args) end end