[Scummvm-git-logs] scummvm master -> 1bb73862a10ab93ad884c9dec2908dd092cbc21e

sev- sev at scummvm.org
Sat Aug 1 20:38:53 UTC 2020


This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .

Summary:
1bb73862a1 COMMON: Lightened another MacBinary check so ISOBuster files really work


Commit: 1bb73862a10ab93ad884c9dec2908dd092cbc21e
    https://github.com/scummvm/scummvm/commit/1bb73862a10ab93ad884c9dec2908dd092cbc21e
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2020-08-01T22:38:09+02:00

Commit Message:
COMMON: Lightened another MacBinary check so ISOBuster files really work

Changed paths:
    common/macresman.cpp


diff --git a/common/macresman.cpp b/common/macresman.cpp
index 6e1deee0a0..917bb27854 100644
--- a/common/macresman.cpp
+++ b/common/macresman.cpp
@@ -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;
 		}
 	}




More information about the Scummvm-git-logs mailing list