From a8b095a9cd1f1b784df16cb61b7329fe90cb62e1 Mon Sep 17 00:00:00 2001 From: Toni Wilen Date: Sun, 18 Feb 2018 14:28:28 +0200 Subject: [PATCH] Block max value limit. --- hardfile.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hardfile.cpp b/hardfile.cpp index b3cadafc..fc719ee9 100644 --- a/hardfile.cpp +++ b/hardfile.cpp @@ -1856,7 +1856,7 @@ int scsi_hd_emulate (struct hardfiledata *hfd, struct hd_hardfiledata *hdhfd, ua bdsize = 0; if (!dbd) { uae_u32 blocks = (uae_u32)(hfd->virtsize / hfd->ci.blocksize); - wl(p + 0, blocks < 0x01000000 ? blocks : 0); + wl(p + 0, blocks >= 0x00ffffff ? 0x00ffffff : blocks); wl(p + 4, hfd->ci.blocksize); bdsize = 8; p += bdsize; -- 2.47.3