SM(S)C FDC 37c6xx: Return 0xFF on out of bound register read, fixes segmentation fault on the DEC Venturis 4xx.
This commit is contained in:
@@ -232,7 +232,7 @@ fdc37c6xx_read(uint16_t port, void *priv)
|
|||||||
uint8_t ret = 0xff;
|
uint8_t ret = 0xff;
|
||||||
|
|
||||||
if (dev->tries == 2) {
|
if (dev->tries == 2) {
|
||||||
if (port == 0x3f1)
|
if ((port == 0x3f1) && (dev->cur_reg <= dev->max_reg))
|
||||||
ret = dev->regs[dev->cur_reg];
|
ret = dev->regs[dev->cur_reg];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user