diff --git a/hw/fdc.c b/hw/fdc.c index e47a1da902d3fd414f42f33b8664bd9dc3449e9d..cd00420bd522586feddfb3c5184a0ff3993ede55 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];