chore(ui): clarify LUA_TNIL check in FrameScript_Object::SetScript

This commit is contained in:
fallenoak 2025-11-07 19:21:08 -06:00
parent 034e9d0915
commit 749273e217
No known key found for this signature in database
GPG Key ID: 7628F8E61AEA070D

View File

@ -143,7 +143,7 @@ void FrameScript_Object::RunScript(ScriptIx const& script, int32_t argCount, con
}
int32_t FrameScript_Object::SetScript(lua_State* L) {
if (!lua_isstring(L, 2) || lua_type(L, 3) != LUA_TFUNCTION && lua_type(L, 3)) {
if (!lua_isstring(L, 2) || lua_type(L, 3) != LUA_TFUNCTION && lua_type(L, 3) != LUA_TNIL) {
return luaL_error(L, "Usage: %s:SetScript(\"type\", function)", this->GetDisplayName());
}