From 342e08493b5c186df77139cd5628ce2ac52c383d Mon Sep 17 00:00:00 2001 From: Andy McFadden Date: Tue, 23 May 2000 01:59:41 +0000 Subject: [PATCH] Fix broken 140K DOS3.3 disk archives created by old GSHK. Version upped to v1.0.1. --- nufxlib-0/ChangeLog.txt | 5 +++++ nufxlib-0/Thread.c | 17 +++++++++++++++-- nufxlib-0/Version.c.in | 2 +- 3 files changed, 21 insertions(+), 3 deletions(-) diff --git a/nufxlib-0/ChangeLog.txt b/nufxlib-0/ChangeLog.txt index 0b5eb3a..1cc2017 100644 --- a/nufxlib-0/ChangeLog.txt +++ b/nufxlib-0/ChangeLog.txt @@ -1,3 +1,8 @@ +2000/05/22 ***** v1.0.1 shipped ***** + +2000/05/22 fadden + - added workaround for buggy 140K DOS3.3 GSHK images + 2000/05/18 ***** v1.0.0 shipped ***** 2000/05/18 fadden diff --git a/nufxlib-0/Thread.c b/nufxlib-0/Thread.c index c764fad..1ed526c 100644 --- a/nufxlib-0/Thread.c +++ b/nufxlib-0/Thread.c @@ -219,8 +219,21 @@ Nu_ReadThreadHeaders(NuArchive* pArchive, NuRecord* pRecord, ushort* pCrc) { if (pRecord->recStorageType <= 13) { /* supposed to be block size, but SHK v3.0.1 stored it wrong */ - pThread->actualThreadEOF = - pRecord->recExtraType * 512; + pThread->actualThreadEOF = pRecord->recExtraType * 512; + + } else if (pRecord->recStorageType == 256 && + pRecord->recExtraType == 280 && + pRecord->recFileSysID == kNuFileSysDOS33) + { + /* + * Fix for less-common ShrinkIt problem: looks like an old + * version of GS/ShrinkIt used 256 as the block size when + * compressing DOS 3.3 images from 5.25" disks. If that + * appears to be the case here, crank up the block size. + */ + DBUG(("--- no such thing as a 70K disk image!\n")); + pThread->actualThreadEOF = pRecord->recExtraType * 512; + } else { pThread->actualThreadEOF = pRecord->recExtraType * pRecord->recStorageType; diff --git a/nufxlib-0/Version.c.in b/nufxlib-0/Version.c.in index f021f2e..d8266cb 100644 --- a/nufxlib-0/Version.c.in +++ b/nufxlib-0/Version.c.in @@ -13,7 +13,7 @@ /* version number; edit by hand */ static const long gNuMajorVersion = 1; static const long gNuMinorVersion = 0; -static const long gNuBugVersion = 0; +static const long gNuBugVersion = 1; /* executable was build on or after this date (inserted automatically) */ static const char gNuBuildDate[] = "BUILT"; /* approximate */