mirror of
https://github.com/holub/mame
synced 2025-04-26 10:13:37 +03:00
added assert for index out-of-bounds access with sc4dnda (nw)
This commit is contained in:
parent
ad4088d3c4
commit
e440c631ed
@ -155,6 +155,7 @@ UINT16 m68307_timer::read_tcn(UINT16 mem_mask, int which)
|
|||||||
|
|
||||||
void m68307_timer::write_ter(UINT16 data, UINT16 mem_mask, int which)
|
void m68307_timer::write_ter(UINT16 data, UINT16 mem_mask, int which)
|
||||||
{
|
{
|
||||||
|
assert(which >= 0 && which < ARRAY_LENGTH(singletimer));
|
||||||
m68307_single_timer* tptr = &singletimer[which];
|
m68307_single_timer* tptr = &singletimer[which];
|
||||||
if (data & 0x2) tptr->regs[m68307TIMER_TMR] &= ~0x2;
|
if (data & 0x2) tptr->regs[m68307TIMER_TMR] &= ~0x2;
|
||||||
}
|
}
|
||||||
@ -212,6 +213,7 @@ void m68307_timer::write_tmr(UINT16 data, UINT16 mem_mask, int which)
|
|||||||
|
|
||||||
void m68307_timer::write_trr(UINT16 data, UINT16 mem_mask, int which)
|
void m68307_timer::write_trr(UINT16 data, UINT16 mem_mask, int which)
|
||||||
{
|
{
|
||||||
|
assert(which >= 0 && which < ARRAY_LENGTH(singletimer));
|
||||||
m68307_single_timer* tptr = &singletimer[which];
|
m68307_single_timer* tptr = &singletimer[which];
|
||||||
|
|
||||||
COMBINE_DATA(&tptr->regs[m68307TIMER_TRR]);
|
COMBINE_DATA(&tptr->regs[m68307TIMER_TRR]);
|
||||||
|
Loading…
Reference in New Issue
Block a user