Fix 64-bit math error

32-bit * 32-bit = 32-bit, so disk images with partitions whose size
exceeded the capacity of a 32-bit int were coming out wrong.

Updated version to 4.0.3-a1.
This commit is contained in:
Andy McFadden 2017-10-30 10:17:54 -07:00
parent c2e3fb8353
commit 640959dad5
4 changed files with 7 additions and 7 deletions

View File

@ -4,8 +4,8 @@ faddenSoft
http://www.faddensoft.com/ http://www.faddensoft.com/
CiderPress CiderPress
http://a2ciderpress.com/ http://a2ciderpress.com/
4.0.2 4.0.3-a1
43000 43038
C:\DATA\faddenSoft\fs.ico C:\DATA\faddenSoft\fs.ico
Copyright © 2017 CiderPress project authors. All rights reserved. Copyright © 2017 CiderPress project authors. All rights reserved.
C:\Src\CiderPress\DIST\ReadMe.txt C:\Src\CiderPress\DIST\ReadMe.txt
@ -357,7 +357,7 @@ FALSE
4095 4095
Setup402.exe Setup403-a1.exe
FALSE FALSE

View File

@ -14,8 +14,8 @@
/* CiderPress version numbers */ /* CiderPress version numbers */
#define kAppMajorVersion 4 #define kAppMajorVersion 4
#define kAppMinorVersion 0 #define kAppMinorVersion 0
#define kAppBugVersion 2 #define kAppBugVersion 3
#define kAppDevString L"" #define kAppDevString L"-a1"
/* /*
* Windows application object. * Windows application object.

View File

@ -472,7 +472,7 @@ DIError DiskImg::OpenImage(DiskImg* pParent, long firstBlock, long numBlocks)
* already have an open file with specific characteristics. * already have an open file with specific characteristics.
*/ */
//fOffset = pParent->fOffset + kBlockSize * firstBlock; //fOffset = pParent->fOffset + kBlockSize * firstBlock;
fLength = numBlocks * kBlockSize; fLength = (di_off_t)numBlocks * kBlockSize;
fOuterLength = fWrappedLength = fLength; fOuterLength = fWrappedLength = fLength;
fFileFormat = kFileFormatUnadorned; fFileFormat = kFileFormatUnadorned;
fPhysical = pParent->fPhysical; fPhysical = pParent->fPhysical;

View File

@ -45,7 +45,7 @@ namespace DiskImgLib {
/* compiled-against versions; call DiskImg::GetVersion for linked-against */ /* compiled-against versions; call DiskImg::GetVersion for linked-against */
#define kDiskImgVersionMajor 5 #define kDiskImgVersionMajor 5
#define kDiskImgVersionMinor 0 #define kDiskImgVersionMinor 0
#define kDiskImgVersionBug 0 #define kDiskImgVersionBug 1
/* /*