From edea3bf26a4b6c5887411ce6b5c63019f16d192a Mon Sep 17 00:00:00 2001 From: SarahW Date: Sat, 7 Apr 2018 14:03:15 +0100 Subject: [PATCH] Fixed data padding on ZIP drive SCSI/ATAPI commands. Fixes NT4 with ATAPI ZIP. --- src/scsi_zip.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/scsi_zip.c b/src/scsi_zip.c index 62a28cb..38067d7 100644 --- a/src/scsi_zip.c +++ b/src/scsi_zip.c @@ -327,7 +327,7 @@ static int scsi_zip_command(uint8_t *cdb, void *p) makes disc health read as 'marginal'*/ for (c = 2; c < 0x58; c++) add_data_len(0xff); - for (; i < len; i++) + while (i < len) add_data_len(0); data->cmd_pos = CMD_POS_IDLE; bus_state = BUS_IO; @@ -345,7 +345,7 @@ static int scsi_zip_command(uint8_t *cdb, void *p) add_data_len(0); for (c = 0; c < 39; c++) add_data_len(0); - for (; i < len; i++) + while (i < len) add_data_len(0); data->cmd_pos = CMD_POS_IDLE; bus_state = BUS_IO; @@ -565,7 +565,7 @@ static int scsi_zip_command(uint8_t *cdb, void *p) } else { - len = cdb[8] | (cdb[9] << 8); + len = cdb[8] | (cdb[7] << 8); add_data_len(0); add_data_len(0); @@ -638,7 +638,7 @@ static int scsi_zip_command(uint8_t *cdb, void *p) add_data_len(0x0f); } - for (; i < len; i++) + while (i < len) add_data_len(0); len = data->data_pos_write;