Return nil on skincolor invalid field access

This commit is contained in:
SwitchKaze 2020-12-21 15:48:49 -06:00
parent 8c97583779
commit ad8abcef09
1 changed files with 3 additions and 1 deletions

View File

@ -1635,8 +1635,10 @@ static int skincolor_get(lua_State *L)
lua_pushinteger(L, info->chatcolor);
else if (fastcmp(field,"accessible"))
lua_pushboolean(L, info->accessible);
else
else {
CONS_Debug(DBG_LUA, M_GetText("'%s' has no field named '%s'; returning nil.\n"), "skincolor_t", field);
return 0;
}
return 1;
}