Merge pull request #3093 from firewave/coverity_cdp1879

cdp1879.cpp: fixed Coverity out-of-bounds warnings (nw)
This commit is contained in:
ajrhacker 2018-01-20 12:19:40 -05:00 committed by GitHub
commit aa78e15092
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 2 deletions

View File

@ -70,7 +70,7 @@ void cdp1879_device::device_timer(emu_timer &timer, device_timer_id id, int para
// comparator IRQ
bool new_state = true;
for (int i = R_CNT_SECONDS; i <= R_CNT_MONTH; i++)
for (int i = R_CNT_SECONDS; i <= R_CNT_HOURS; i++)
{
if(m_regs[i] != m_regs[i + 6])
{

View File

@ -71,7 +71,7 @@ private:
R_ALM_HOURS
};
u8 m_regs[10];
u8 m_regs[11];
bool m_comparator_state;
// timers