Avoid iterating over "has-bad-pointers" fields of IDTYPE_STRUCT and others

dfhack/df-structures@4c224dd205
develop
lethosor 2017-08-05 21:34:16 -04:00
parent 9ba459f21e
commit d280863bc8
1 changed files with 2 additions and 3 deletions

@ -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;