mirror of
https://git.do.srb2.org/STJr/SRB2.git
synced 2024-11-15 01:01:33 +00:00
Fix segfault when trying to set a read-only field on player_t
This commit is contained in:
parent
8ce0328423
commit
beda6109b2
1 changed files with 2 additions and 2 deletions
|
@ -843,7 +843,7 @@ static int player_get(lua_State *L)
|
|||
return 1;
|
||||
}
|
||||
|
||||
#define NOSET luaL_error(L, LUA_QL("player_t") " field " LUA_QS " should not be set directly.", field)
|
||||
#define NOSET luaL_error(L, LUA_QL("player_t") " field " LUA_QS " should not be set directly.", player_opt[field])
|
||||
static int player_set(lua_State *L)
|
||||
{
|
||||
player_t *plr = *((player_t **)luaL_checkudata(L, 1, META_PLAYER));
|
||||
|
@ -1392,7 +1392,7 @@ static int power_len(lua_State *L)
|
|||
}
|
||||
|
||||
#define NOFIELD luaL_error(L, LUA_QL("ticcmd_t") " has no field named " LUA_QS, field)
|
||||
#define NOSET luaL_error(L, LUA_QL("ticcmd_t") " field " LUA_QS " should not be set directly.", field)
|
||||
#define NOSET luaL_error(L, LUA_QL("ticcmd_t") " field " LUA_QS " should not be set directly.", ticcmd_opt[field])
|
||||
|
||||
enum ticcmd_e
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue