Merge branch 'next' into 'next'

Return nil on skincolor invalid field access

See merge request STJr/SRB2!1351
This commit is contained in:
James R 2020-12-22 20:13:45 -05:00
commit 0d1050f360
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;
}