if (MachOObj->is64Bit()) {
InMemoryStruct<macho::Section64> Sect;
getSection64(DRI, Sect);
- Result = (Sect->Flags & MachO::SectionTypeZeroFill ||
- Sect->Flags & MachO::SectionTypeZeroFillLarge);
+ unsigned SectionType = Sect->Flags & MachO::SectionFlagMaskSectionType;
+ Result = (SectionType == MachO::SectionTypeZeroFill ||
+ SectionType == MachO::SectionTypeZeroFillLarge);
} else {
InMemoryStruct<macho::Section> Sect;
getSection(DRI, Sect);
- Result = (Sect->Flags & MachO::SectionTypeZeroFill ||
- Sect->Flags & MachO::SectionTypeZeroFillLarge);
+ unsigned SectionType = Sect->Flags & MachO::SectionFlagMaskSectionType;
+ Result = (SectionType == MachO::SectionTypeZeroFill ||
+ SectionType == MachO::SectionTypeZeroFillLarge);
}
return object_error::success;