diff options
Diffstat (limited to 'hw/ide.c')
-rw-r--r-- | hw/ide.c | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -1631,9 +1631,9 @@ static void ide_ioport_write(void *opaque, uint32_t addr, uint32_t val) ide_set_irq(s); break; case WIN_SETMULT: - if ((s->nsector & 0xff) > MAX_MULT_SECTORS || - s->nsector == 0 || - (s->nsector & (s->nsector - 1)) != 0) { + if ((s->nsector & 0xff) != 0 && + ((s->nsector & 0xff) > MAX_MULT_SECTORS || + (s->nsector & (s->nsector - 1)) != 0)) { ide_abort_command(s); } else { s->mult_sectors = s->nsector & 0xff; |