From 640959dad551ba75a48bd3c49629579730ead351 Mon Sep 17 00:00:00 2001 From: Andy McFadden Date: Mon, 30 Oct 2017 10:17:54 -0700 Subject: [PATCH] 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. --- DIST/with-mdc.deploy | 6 +++--- app/MyApp.h | 4 ++-- diskimg/DiskImg.cpp | 2 +- diskimg/DiskImg.h | 2 +- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/DIST/with-mdc.deploy b/DIST/with-mdc.deploy index 8d4619b..93cf000 100644 --- a/DIST/with-mdc.deploy +++ b/DIST/with-mdc.deploy @@ -4,8 +4,8 @@ faddenSoft http://www.faddensoft.com/ CiderPress http://a2ciderpress.com/ -4.0.2 -43000 +4.0.3-a1 +43038 C:\DATA\faddenSoft\fs.ico Copyright © 2017 CiderPress project authors. All rights reserved. C:\Src\CiderPress\DIST\ReadMe.txt @@ -357,7 +357,7 @@ FALSE 4095 -Setup402.exe +Setup403-a1.exe FALSE diff --git a/app/MyApp.h b/app/MyApp.h index 84936c5..ff5d001 100644 --- a/app/MyApp.h +++ b/app/MyApp.h @@ -14,8 +14,8 @@ /* CiderPress version numbers */ #define kAppMajorVersion 4 #define kAppMinorVersion 0 -#define kAppBugVersion 2 -#define kAppDevString L"" +#define kAppBugVersion 3 +#define kAppDevString L"-a1" /* * Windows application object. diff --git a/diskimg/DiskImg.cpp b/diskimg/DiskImg.cpp index 655f263..bcf4e8f 100644 --- a/diskimg/DiskImg.cpp +++ b/diskimg/DiskImg.cpp @@ -472,7 +472,7 @@ DIError DiskImg::OpenImage(DiskImg* pParent, long firstBlock, long numBlocks) * already have an open file with specific characteristics. */ //fOffset = pParent->fOffset + kBlockSize * firstBlock; - fLength = numBlocks * kBlockSize; + fLength = (di_off_t)numBlocks * kBlockSize; fOuterLength = fWrappedLength = fLength; fFileFormat = kFileFormatUnadorned; fPhysical = pParent->fPhysical; diff --git a/diskimg/DiskImg.h b/diskimg/DiskImg.h index de65051..78d81b9 100644 --- a/diskimg/DiskImg.h +++ b/diskimg/DiskImg.h @@ -45,7 +45,7 @@ namespace DiskImgLib { /* compiled-against versions; call DiskImg::GetVersion for linked-against */ #define kDiskImgVersionMajor 5 #define kDiskImgVersionMinor 0 -#define kDiskImgVersionBug 0 +#define kDiskImgVersionBug 1 /*