Fix compilation for some gcc versions

This commit is contained in:
indev committed 2024-06-02 00:39:22 +03:00
1 parent 086d0113c5
commit da9d57a624
2 files changed
+6 -2

No files matched your search

+3 -1
View File
@@ -1647,6 +1647,7 @@ static int mapheaderinfo_get(lua_State *L)
break;
// TODO add support for reading numGradedMares and grades
default:
{
// Read custom vars now
// (note: don't include the "LUA." in your lua scripts!)
UINT8 j = 0;
@@ -1657,6 +1658,7 @@ static int mapheaderinfo_get(lua_State *L)
else
lua_pushnil(L);
}
}
return 1;
}
@@ -1832,4 +1834,4 @@ int LUA_MapLib(lua_State *L)
lua_setmetatable(L, -2);
lua_setglobal(L, "mapheaderinfo");
return 0;
}
}
+3 -1
View File
@@ -886,11 +886,13 @@ static int mapthing_set(lua_State *L)
mt->z = (INT16)luaL_checkinteger(L, 3);
break;
case mapthing_extrainfo:
{
INT32 extrainfo = luaL_checkinteger(L, 3);
if (extrainfo & ~15)
return luaL_error(L, "mapthing_t extrainfo set %d out of range (%d - %d)", extrainfo, 0, 15);
mt->extrainfo = (UINT8)extrainfo;
break;
}
case mapthing_mobj:
mt->mobj = *((mobj_t **)luaL_checkudata(L, 3, META_MOBJ));
break;
@@ -979,4 +981,4 @@ int LUA_MobjLib(lua_State *L)
lua_setmetatable(L, -2);
lua_setglobal(L, "mapthings");
return 0;
}
}