mirror of
https://github.com/dingusdev/dingusppc.git
synced 2024-12-22 15:29:58 +00:00
scsihd: Allow read and write > 4 GB.
This commit is contained in:
parent
bfc703a556
commit
06640844e9
@ -361,7 +361,7 @@ void ScsiHardDisk::read(uint32_t lba, uint16_t transfer_len, uint8_t cmd_len) {
|
||||
}
|
||||
|
||||
transfer_size *= this->sector_size;
|
||||
uint64_t device_offset = lba * this->sector_size;
|
||||
uint64_t device_offset = (uint64_t)lba * this->sector_size;
|
||||
|
||||
this->disk_img.read(data_buf, device_offset, transfer_size);
|
||||
|
||||
@ -378,7 +378,7 @@ void ScsiHardDisk::write(uint32_t lba, uint16_t transfer_len, uint8_t cmd_len) {
|
||||
}
|
||||
|
||||
transfer_size *= this->sector_size;
|
||||
uint64_t device_offset = lba * this->sector_size;
|
||||
uint64_t device_offset = (uint64_t)lba * this->sector_size;
|
||||
|
||||
this->incoming_size = transfer_size;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user