From 7f8ec74c274e0bdd3b9f35d8c329ae7707456022 Mon Sep 17 00:00:00 2001 From: James R Date: Sat, 10 Oct 2020 17:40:01 -0700 Subject: [PATCH] Use the macro in sectorlines_num too --- src/lua_maplib.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lua_maplib.c b/src/lua_maplib.c index 132c81e48..855ec9482 100644 --- a/src/lua_maplib.c +++ b/src/lua_maplib.c @@ -481,7 +481,7 @@ static int sectorlines_num(lua_State *L) return luaL_error(L, "accessed sector_t.lines doesn't exist anymore."); // see comments in the _get function above - numoflines = (size_t)(*(size_t *)(((size_t)seclines) - (offsetof(sector_t, lines) - offsetof(sector_t, linecount)))); + numoflines = *(size_t *)FIELDFROM (sector_t, seclines, lines,/* -> */linecount); lua_pushinteger(L, numoflines); return 1; }