Change union offset validation
This commit is contained in:
parent
c7fb8c79fc
commit
046ea15f36
|
@ -1472,9 +1472,7 @@ fn get_anon_unions(info: &DwarfInfo, members: &[StructureMember]) -> Result<Vec<
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
let size =
|
if member.offset >= max_offset || member.offset < anon.offset {
|
||||||
if let Some(size) = member.byte_size { size } else { member.kind.size(info)? };
|
|
||||||
if member.offset + size > max_offset || member.offset < anon.offset {
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
anon.member_count += 1;
|
anon.member_count += 1;
|
||||||
|
|
Loading…
Reference in New Issue