diff --git a/src/core/interpreter.cc b/src/core/interpreter.cc index a04b11d92e0f..ea2973687748 100644 --- a/src/core/interpreter.cc +++ b/src/core/interpreter.cc @@ -409,8 +409,6 @@ auto Interpreter::AddFunction(string_view sha, string_view body, string* result) if (type == LUA_TNIL && !AddInternal(funcname, body, result)) return COMPILE_ERR; - result->assign(funcname + 2); - return type == LUA_TNIL ? ADD_OK : ALREADY_EXISTS; } diff --git a/src/server/main_service.cc b/src/server/main_service.cc index 6eab711828a0..5c311cd6b9c6 100644 --- a/src/server/main_service.cc +++ b/src/server/main_service.cc @@ -1080,7 +1080,7 @@ optional LoadScipt(string_view sha, ScriptMgr* script_m string err; CHECK_EQ(Interpreter::ADD_OK, interpreter->AddFunction(sha, script_data->body, &err)); - CHECK(err.empty()); + CHECK(err.empty()) << err; return script_data; }