Return nil on skincolor invalid field access
This commit is contained in:
parent
8c97583779
commit
ad8abcef09
|
@ -1635,8 +1635,10 @@ static int skincolor_get(lua_State *L)
|
||||||
lua_pushinteger(L, info->chatcolor);
|
lua_pushinteger(L, info->chatcolor);
|
||||||
else if (fastcmp(field,"accessible"))
|
else if (fastcmp(field,"accessible"))
|
||||||
lua_pushboolean(L, info->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);
|
CONS_Debug(DBG_LUA, M_GetText("'%s' has no field named '%s'; returning nil.\n"), "skincolor_t", field);
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue