Commit 73108e70 authored by salix5's avatar salix5

use text mode in luaL_loadbufferx

parent 3d8b79df
...@@ -139,7 +139,7 @@ int32_t interpreter::load_script(const char* script_name) { ...@@ -139,7 +139,7 @@ int32_t interpreter::load_script(const char* script_name) {
return OPERATION_FAIL; return OPERATION_FAIL;
++no_action; ++no_action;
luaL_checkstack(current_state, 2, nullptr); luaL_checkstack(current_state, 2, nullptr);
int32_t error = luaL_loadbuffer(current_state, (const char*)buffer, len, script_name) || lua_pcall(current_state, 0, 0, 0); int32_t error = luaL_loadbufferx(current_state, (const char*)buffer, len, script_name, "t") || lua_pcall(current_state, 0, 0, 0);
if (error) { if (error) {
interpreter::sprintf(pduel->strbuffer, "%s", lua_tostring(current_state, -1)); interpreter::sprintf(pduel->strbuffer, "%s", lua_tostring(current_state, -1));
handle_message(pduel, 1); handle_message(pduel, 1);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment