]> git.unchartedbackwaters.co.uk Git - francis/winuae.git/commitdiff
Block max value limit.
authorToni Wilen <twilen@winuae.net>
Sun, 18 Feb 2018 12:28:28 +0000 (14:28 +0200)
committerToni Wilen <twilen@winuae.net>
Sun, 18 Feb 2018 12:28:28 +0000 (14:28 +0200)
hardfile.cpp

index b3cadafc59488687e13bfd90913a0323b2c57bdb..fc719ee9521043774c3fbac58e51c08bf6f3471c 100644 (file)
@@ -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;