diff options
author | 2016-11-02 17:07:42 +0000 | |
---|---|---|
committer | 2016-11-03 11:46:30 +0000 | |
commit | fbcb76f6e78092ece7ea6acb5105ad32d8c419ec (patch) | |
tree | ee0c811e2e20279c2b56e3d94bacb060624fc99d | |
parent | cfa91fd58f15769c2c2ce0b837323490b5a751b2 (diff) |
fix for visual studio debug builds asserting on &[0] when size is zero (nw)
-rw-r--r-- | src/devices/bus/msx_cart/cartridge.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/devices/bus/msx_cart/cartridge.cpp b/src/devices/bus/msx_cart/cartridge.cpp index 4dae6ac0471..9f1e27c44c8 100644 --- a/src/devices/bus/msx_cart/cartridge.cpp +++ b/src/devices/bus/msx_cart/cartridge.cpp @@ -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) { 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) { 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) { 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) { m_sram.resize(size); - memset(&m_sram[0], 0x00, size); + std::fill_n(m_sram.begin(), size, 0x00); } |