Веб-сайт самохостера Lotigara

summaryrefslogtreecommitdiff
path: root/source/core/StarLua.cpp
diff options
context:
space:
mode:
authorKae <80987908+Novaenia@users.noreply.github.com>2024-02-22 17:25:46 +1100
committerKae <80987908+Novaenia@users.noreply.github.com>2024-02-22 17:25:46 +1100
commitae3ecabceab6e1d95da354d7848fb5dff687c330 (patch)
treee50d2ad669833e5fb0671dcfda64ea5ad8190d74 /source/core/StarLua.cpp
parentf5ddb0067545e96011477ba936c464edfd477ebd (diff)
loadstring shouldn't accept bytecode
Diffstat (limited to 'source/core/StarLua.cpp')
-rw-r--r--source/core/StarLua.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/source/core/StarLua.cpp b/source/core/StarLua.cpp
index 84e6c82..b5e6b8a 100644
--- a/source/core/StarLua.cpp
+++ b/source/core/StarLua.cpp
@@ -1142,7 +1142,7 @@ LuaFunction LuaEngine::createRawFunction(lua_CFunction function) {
LuaFunction LuaEngine::createFunctionFromSource(int handleIndex, char const* contents, size_t size, char const* name) {
lua_checkstack(m_state, 2);
- handleError(m_state, luaL_loadbuffer(m_state, contents, size, name));
+ handleError(m_state, luaL_loadbufferx(m_state, contents, size, name, "t"));
pushHandle(m_state, handleIndex);
lua_setupvalue(m_state, -2, 1);