COMMON: Lightened another MacBinary check so ISOBuster files really work

This commit is contained in:
Eugene Sandulenko 2020-08-01 22:38:09 +02:00
parent 73508f6111
commit 1bb73862a1

View File

@ -385,10 +385,11 @@ bool MacResManager::isMacBinary(SeekableReadStream &stream) {
uint32 rsrcSize = READ_BE_UINT32(infoHeader + MBI_RFLEN);
uint32 dataSizePad = (((dataSize + 127) >> 7) << 7);
uint32 rsrcSizePad = (((rsrcSize + 127) >> 7) << 7);
// Files produced by ISOBuster are not padded, thus, compare with the actual size
//uint32 rsrcSizePad = (((rsrcSize + 127) >> 7) << 7);
// Length check
if (MBI_INFOHDR + dataSizePad + rsrcSizePad == (uint32)stream.size()) {
if (MBI_INFOHDR + dataSizePad + rsrcSize <= (uint32)stream.size()) {
resForkOffset = MBI_INFOHDR + dataSizePad;
}
}