Do a refactor of command parsing in lpxclient and lpxserver
This commit is contained in:
@@ -268,7 +268,7 @@ int64_t World::create_login_actor(bool initialize) {
|
||||
return id;
|
||||
}
|
||||
|
||||
eng::string World::probe_lua(int64_t actor_id, const eng::string &lua) {
|
||||
eng::string World::probe_lua(int64_t actor_id, std::string_view lua) {
|
||||
assert(stack_is_clear());
|
||||
lua_State *L = state();
|
||||
|
||||
@@ -281,7 +281,7 @@ eng::string World::probe_lua(int64_t actor_id, const eng::string &lua) {
|
||||
LuaExtStack LS(L, closure);
|
||||
|
||||
// create the compiled closure.
|
||||
int status = luaL_loadbuffer(L, lua.c_str(), lua.size(), "=probe");
|
||||
int status = luaL_loadbuffer(L, lua.data(), lua.size(), "=probe");
|
||||
lua_replace(L, closure.index());
|
||||
if (status != LUA_OK) {
|
||||
// The closure is actually an error message. Do nothing.
|
||||
|
||||
Reference in New Issue
Block a user