mirror of
https://github.com/holub/mame
synced 2025-07-03 17:08:39 +03:00
fix for visual studio debug builds asserting on &[0] when size is zero (nw)
This commit is contained in:
parent
cfa91fd58f
commit
fbcb76f6e7
@ -78,25 +78,25 @@ msx_cart_interface::msx_cart_interface(const machine_config &mconfig, device_t &
|
|||||||
void msx_cart_interface::rom_alloc(uint32_t size)
|
void msx_cart_interface::rom_alloc(uint32_t size)
|
||||||
{
|
{
|
||||||
m_rom.resize(size);
|
m_rom.resize(size);
|
||||||
memset(&m_rom[0], 0xff, size);
|
std::fill_n(m_rom.begin(), size, 0xff);
|
||||||
}
|
}
|
||||||
|
|
||||||
void msx_cart_interface::rom_vlm5030_alloc(uint32_t size)
|
void msx_cart_interface::rom_vlm5030_alloc(uint32_t size)
|
||||||
{
|
{
|
||||||
m_rom_vlm5030.resize(size);
|
m_rom_vlm5030.resize(size);
|
||||||
memset(&m_rom_vlm5030[0], 0xff, size);
|
std::fill_n(m_rom_vlm5030.begin(), size, 0xff);
|
||||||
}
|
}
|
||||||
|
|
||||||
void msx_cart_interface::ram_alloc(uint32_t size)
|
void msx_cart_interface::ram_alloc(uint32_t size)
|
||||||
{
|
{
|
||||||
m_ram.resize(size);
|
m_ram.resize(size);
|
||||||
memset(&m_ram[0], 0x00, size);
|
std::fill_n(m_ram.begin(), size, 0x00);
|
||||||
}
|
}
|
||||||
|
|
||||||
void msx_cart_interface::sram_alloc(uint32_t size)
|
void msx_cart_interface::sram_alloc(uint32_t size)
|
||||||
{
|
{
|
||||||
m_sram.resize(size);
|
m_sram.resize(size);
|
||||||
memset(&m_sram[0], 0x00, size);
|
std::fill_n(m_sram.begin(), size, 0x00);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user