mirror of
https://git.do.srb2.org/STJr/SRB2.git
synced 2025-03-13 14:25:10 +00:00
Merge branch 'fix-mobjinfo-custom-field' into 'next'
Fix Lua warning when accessing custom field on mobjinfo Closes #1043 See merge request STJr/SRB2!2034
This commit is contained in:
commit
f13fddaf58
1 changed files with 1 additions and 1 deletions
|
@ -1168,7 +1168,7 @@ static int mobjinfo_fields_ref = LUA_NOREF;
|
||||||
static int mobjinfo_get(lua_State *L)
|
static int mobjinfo_get(lua_State *L)
|
||||||
{
|
{
|
||||||
mobjinfo_t *info = *((mobjinfo_t **)luaL_checkudata(L, 1, META_MOBJINFO));
|
mobjinfo_t *info = *((mobjinfo_t **)luaL_checkudata(L, 1, META_MOBJINFO));
|
||||||
enum mobjinfo_e field = luaL_checkoption(L, 2, mobjinfo_opt[0], mobjinfo_opt);
|
enum mobjinfo_e field = Lua_optoption(L, 2, mobjinfo_doomednum, mobjinfo_fields_ref);
|
||||||
|
|
||||||
I_Assert(info != NULL);
|
I_Assert(info != NULL);
|
||||||
I_Assert(info >= mobjinfo);
|
I_Assert(info >= mobjinfo);
|
||||||
|
|
Loading…
Reference in a new issue