From d280863bc8bd07616e675232f4f16257aa31f2f8 Mon Sep 17 00:00:00 2001 From: lethosor Date: Sat, 5 Aug 2017 21:34:16 -0400 Subject: [PATCH] Avoid iterating over "has-bad-pointers" fields of IDTYPE_STRUCT and others dfhack/df-structures@4c224dd20567a9eda652ca9522bd0547be4bf358 --- library/LuaTypes.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/library/LuaTypes.cpp b/library/LuaTypes.cpp index 5b5a174fa..6e3c5d5cf 100644 --- a/library/LuaTypes.cpp +++ b/library/LuaTypes.cpp @@ -1190,9 +1190,8 @@ static void IndexFields(lua_State *state, int base, struct_identity *pstruct, bo continue; case struct_field_info::POINTER: - // Skip class-typed pointers within unions - if ((fields[i].count & 2) != 0 && fields[i].type && - fields[i].type->type() == IDTYPE_CLASS) + // Skip class-typed pointers within unions and other bad pointers + if ((fields[i].count & 2) != 0 && fields[i].type) add_to_enum = false; break;