Skip to content

Commit abfe814

Browse files
committed
Use loadstring instead of _COMPILER in CScriptEngine
1 parent be195ab commit abfe814

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

src/xrServerEntities/script_engine.cpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -572,10 +572,11 @@ int CScriptEngine::load_string(
572572
LPCSTR caNameSpaceName
573573
)
574574
{
575-
lua_getglobal(lua(), "_COMPILER");
575+
// Use the Lua-side loadstring primitive, since luaL_loadstring would step around script compiler machinery
576+
lua_getglobal(lua(), "loadstring");
576577
if (!lua_isfunction(lua(), -1))
577578
{
578-
FATAL("_COMPILER not available");
579+
FATAL("loadstring not available");
579580
}
580581

581582
lua_pushstring(lua(), caString);

0 commit comments

Comments
 (0)