From 435051f73da1b1198abdbb56977789ff23f83a0b Mon Sep 17 00:00:00 2001 From: Sour Date: Tue, 19 May 2020 22:33:51 -0400 Subject: [PATCH] Debugger: Lua - Fixed incorrect runtime check for removeEventCallback --- Core/LuaApi.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Core/LuaApi.cpp b/Core/LuaApi.cpp index 4d4085b..27177be 100644 --- a/Core/LuaApi.cpp +++ b/Core/LuaApi.cpp @@ -367,7 +367,7 @@ int LuaApi::UnregisterEventCallback(lua_State *lua) EventType type = (EventType)l.ReadInteger(); int reference = l.ReadInteger(); checkparams(); - errorCond(type < EventType::Reset || type >= EventType::EventTypeSize, "the specified type is invalid"); + errorCond(type < EventType::Nmi || type >= EventType::EventTypeSize, "the specified type is invalid"); errorCond(reference == LUA_NOREF, "function reference is invalid"); _context->UnregisterEventCallback(type, reference); return l.ReturnCount();