nulleric
/Fix-a-Fork
/amendments
/13
Better checks for sit versions.
Learned DC4.2
eric made amendment 13 about 1 year ago
--- main.c Thu Nov 9 08:52:52 2023
+++ main.c Thu Nov 9 09:20:27 2023
@@ -153,14 +153,27 @@ Boolean isBinHex4()
Boolean isSit15()
{
- return magicCheck("SIT!", 0, 'SIT!', 'SIT!');
+ short stuffitVersion = 0;
+ if(magicCheck("SIT!", 0, 'SIT!', 'SIT!'))
+ {
+ gType = 0;
+ gCreator = 0;
+ // 0x01 for 1.5.x, 0x02 for 1.6-4.5
+ stuffitVersion = gBuf[14];
+ return (stuffitVersion == 0x01 || stuffitVersion == 0x02) && magicCheck("rLau", 10, 'SIT!', 'SIT!');
+ }
}
Boolean isSit5()
{
- return magicCheck("StuffIt (c)", 0, 'SITD', 'SIT!');
+ short stuffitVersion = gBuf[82]; // 0x05
+ return (stuffitVersion == 0x05 && magicCheck("StuffIt (c)1997", 0, 'SITD', 'SIT!'));
}
+Boolean isDsk4()
+{
+ return magicCheck("LK", 0, 'dImg', 'dCpy');
+}
// Disk Copy 6
Boolean isDsk_1024()
{