bochs: fix segmentation fault (after BX_PANIC) in HDD controller

Change-Id: I584e883b89ae36f4cee83684f9461e7baafa1495
This commit is contained in:
Christoph Borchert
2016-09-09 11:32:14 +02:00
parent 9886a0345e
commit e25c42f2b2

View File

@ -1245,8 +1245,10 @@ void bx_hard_drive_c::write(Bit32u address, Bit32u value, unsigned io_len)
break;
case 0xa0: // PACKET
if (BX_SELECTED_CONTROLLER(channel).buffer_index >= PACKET_SIZE)
if (BX_SELECTED_CONTROLLER(channel).buffer_index >= PACKET_SIZE) {
BX_PANIC(("IO write(0x%04x): buffer_index >= PACKET_SIZE", address));
return;
}
switch (io_len) {
case 4: