machine/at28c64b: read overflow initializing nvram (MAMETesters 08524) (#12594)

* Actual rom size may be less than AT28C64B_DATA_BYTES.  a2bus/booti, as a motivating example, has a ROM size of 0x2000.
This commit is contained in:
ksherlock 2024-07-18 16:49:19 -04:00 committed by GitHub
parent 1b956a91c0
commit f0faf6b78a
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -96,7 +96,7 @@ void at28c64b_device::nvram_default()
/* populate from a memory region if present */
if (m_default_data.found())
{
for (offs_t offs = 0; offs < AT28C64B_DATA_BYTES; offs++)
for (offs_t offs = 0; offs < m_default_data.length(); offs++)
space(AS_PROGRAM).write_byte(offs, m_default_data[offs]);
}
}