[core] fix formatting for drives with nonstandard sector size

* Issue #385
* Also bump version to 1.4.11
This commit is contained in:
Pete Batard 2014-10-28 19:16:35 +00:00
parent 432edfa9c5
commit 91565477ed
8 changed files with 43 additions and 34 deletions

View file

@ -179,7 +179,7 @@ static int SatAtaPassthrough(HANDLE hPhysical, ATA_PASSTHROUGH_CMD* Command, voi
int t_length = 0; /* 0 -> no data transferred */
uint8_t Direction;
if (BufLen % 512 != 0) {
if (BufLen % SelectedDrive.Geometry.BytesPerSector != 0) {
uprintf("SatAtaPassthrough: BufLen must be a multiple of <block size>\n");
return SPT_ERROR_BUFFER;
}