Previous 199869 Revisions Next

r32902 Thursday 23rd October, 2014 at 09:15:43 UTC by Oliver Stöneberg
fixed signed integer overflow in address_table::subtable_open() - by O. Galibert (nw)
[src/emu]memory.c

trunk/src/emu/memory.c
r241413r241414
34353435      for (int i=0; i<size; i++)
34363436         subptr[i] = subentry;
34373437      m_table[l1index] = newentry;
3438      m_subtable[newentry - SUBTABLE_BASE].m_checksum = (subentry + (subentry << 8) + (subentry << 16) + (subentry << 24)) * ((1 << level2_bits())/4);
3438      UINT32 subkey = subentry + (subentry << 8) + (subentry << 16) + (subentry << 24);
3439      m_subtable[newentry - SUBTABLE_BASE].m_checksum = subkey * (((1 << level2_bits())/4));
34393440      subentry = newentry;
34403441   }
34413442


Previous 199869 Revisions Next


© 1997-2024 The MAME Team