mirror of
https://github.com/holub/mame
synced 2025-07-04 17:38:08 +03:00
fixed MT03464: fixed potential out of array access in src/emu/video/voodoo.c logerror() [Oliver Stöneberg]
This commit is contained in:
parent
cc659dcabd
commit
7a7fa028bd
@ -3720,7 +3720,7 @@ static UINT32 register_r(voodoo_state *v, offs_t offset)
|
|||||||
/* first make sure this register is readable */
|
/* first make sure this register is readable */
|
||||||
if (!(v->regaccess[regnum] & REGISTER_READ))
|
if (!(v->regaccess[regnum] & REGISTER_READ))
|
||||||
{
|
{
|
||||||
logerror("VOODOO.%d.ERROR:Invalid attempt to read %s\n", v->index, v->regnames[regnum]);
|
logerror("VOODOO.%d.ERROR:Invalid attempt to read %s\n", v->index, regnum < 225 ? v->regnames[regnum] : "unknown register");
|
||||||
return 0xffffffff;
|
return 0xffffffff;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user