aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--hw/fdc.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/hw/fdc.c b/hw/fdc.c
index e47a1da902..cd00420bd5 100644
--- a/hw/fdc.c
+++ b/hw/fdc.c
@@ -1137,9 +1137,9 @@ static void fdctrl_start_transfer (fdctrl_t *fdctrl, int direction)
} else {
int tmp;
fdctrl->data_len = 128 << (fdctrl->fifo[5] > 7 ? 7 : fdctrl->fifo[5]);
- tmp = (cur_drv->last_sect - ks + 1);
+ tmp = (fdctrl->fifo[6] - ks + 1);
if (fdctrl->fifo[0] & 0x80)
- tmp += cur_drv->last_sect;
+ tmp += fdctrl->fifo[6];
fdctrl->data_len *= tmp;
}
fdctrl->eot = fdctrl->fifo[6];