diff --git a/src/LuaJITEngine.cpp b/src/LuaJITEngine.cpp index 2ce826b..0ec77ef 100644 --- a/src/LuaJITEngine.cpp +++ b/src/LuaJITEngine.cpp @@ -114,8 +114,8 @@ struct LuaJITEngine : ScriptEngine { // Declare the function `_castBlock` used to transform `luaBlock` pointer into a LuaJIT cdata << "_ffi_cast = ffi.cast" << std::endl << "function _castBlock(b) return _ffi_cast('struct LuaProcessBlock*', b) end" << std::endl - // Unload ffi and require - << "ffi = nil; require = nil;" << std::endl; + // Remove global functions that could be abused + << "jit = nil; require = nil; ffi = nil; load = nil; loadfile = nil; loadstring = nil; dofile = nil;" << std::endl; std::string ffi_script = ffi_stream.str(); // Compile the ffi script