Add VALIDATE_LUA as a function in lpxserver and lpxclient

This commit is contained in:
2025-12-03 19:55:53 -05:00
parent 27b5ce7ef4
commit a242244f9c
9 changed files with 86 additions and 27 deletions

View File

@@ -78,9 +78,7 @@ static void calculate_loadresult(LuaCoreStack &LS0, LuaSlot info, const eng::str
if (code == "") {
LS.rawset(info, "loadresult", "missing or empty source file");
} else {
eng::string chunk = "=" + fn;
luaL_loadbuffer(LS.state(), code.c_str(), code.size(), chunk.c_str());
lua_replace(LS.state(), loadresult.index());
LS.load(loadresult, code, fn);
LS.rawset(info, "loadresult", loadresult);
}
}