From 7d551af78b495240b964a6b1b614b8e710476943 Mon Sep 17 00:00:00 2001 From: OBattler Date: Wed, 15 Jan 2020 00:52:14 +0100 Subject: [PATCH] Fixed a bug in the IDE code. --- src/disk/hdc_ide.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/disk/hdc_ide.c b/src/disk/hdc_ide.c index d6a52702f..b86605761 100644 --- a/src/disk/hdc_ide.c +++ b/src/disk/hdc_ide.c @@ -448,7 +448,7 @@ static void ide_hd_identify(ide_t *ide) char device_identify[9] = { '8', '6', 'B', '_', 'H', 'D', '0', '0', 0 }; uint32_t d_hpc, d_spt, d_tracks; - uint64_t full_size = (hdd[ide->hdd_num].tracks * hdd[ide->hdd_num].hpc * hdd[ide->hdd_num].spt); + uint64_t full_size = (((uint64_t) hdd[ide->hdd_num].tracks) * hdd[ide->hdd_num].hpc * hdd[ide->hdd_num].spt); device_identify[6] = (ide->hdd_num / 10) + 0x30; device_identify[7] = (ide->hdd_num % 10) + 0x30;