Fix code refactoring

This commit is contained in:
BONNAURE Olivier 2024-02-06 10:39:17 +01:00
parent 9d89be2a59
commit e3e37f77c8

View file

@ -3244,7 +3244,6 @@ static bool ShouldServeCrashReportDetails(void) {
static char *LuaOnHttpRequest(void) { static char *LuaOnHttpRequest(void) {
char *error; char *error;
const char *errormessage;
lua_State *L = GL; lua_State *L = GL;
effectivepath.p = url.path.p; effectivepath.p = url.path.p;
effectivepath.n = url.path.n; effectivepath.n = url.path.n;
@ -3258,7 +3257,7 @@ static char *LuaOnHttpRequest(void) {
if (hasonerror) { if (hasonerror) {
lua_getglobal(L, "OnError"); lua_getglobal(L, "OnError");
lua_pushinteger(L, 500); lua_pushinteger(L, 500);
lua_pushstring(L, errormessage); lua_pushstring(L, lua_tostring(L, -1));
if (LuaCallWithTrace(L, 2, 0, NULL) == LUA_OK) { if (LuaCallWithTrace(L, 2, 0, NULL) == LUA_OK) {
return CommitOutput(GetLuaResponse()); return CommitOutput(GetLuaResponse());
} else { } else {