diff options
author | Oliver Stöneberg <oliverst@online.de> | 2014-10-29 14:21:12 +0100 |
---|---|---|
committer | Oliver Stöneberg <oliverst@online.de> | 2014-10-29 14:21:12 +0100 |
commit | ff05864ad85b27dc660b7746bf92671b460c7d4d (patch) | |
tree | 94f0d96971d2cdfd863fd1b8d4db724f676497b4 | |
parent | 4cc4bf11be45793f5488da85a18b277e838d145f (diff) |
fixed usage of uninitialized members in sns_sa1_device (nw)
happened with e.g. snes -cart sdf1gpp
-rw-r--r-- | src/emu/bus/snes/sa1.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/emu/bus/snes/sa1.c b/src/emu/bus/snes/sa1.c index 620d1db1285..9b715d135e8 100644 --- a/src/emu/bus/snes/sa1.c +++ b/src/emu/bus/snes/sa1.c @@ -96,11 +96,15 @@ sns_sa1_device::sns_sa1_device(const machine_config &mconfig, const char *tag, d void sns_sa1_device::device_start() { + m_scpu_ctrl = 0; + m_nmi_vector = 0; + m_bank_c_hi = 0; + m_bank_c_rom = 0; } void sns_sa1_device::device_reset() { - memset(m_internal_ram, 0, 0x800); + memset(m_internal_ram, 0, sizeof(m_internal_ram)); m_sa1_ctrl = 0x20; m_scpu_ctrl = 0; @@ -127,7 +131,7 @@ void sns_sa1_device::device_reset() m_iram_write_sa1 = 1; m_src_addr = 0; m_dst_addr = 0; - memset(m_brf_reg, 0, 0x10); + memset(m_brf_reg, 0, sizeof(m_brf_reg)); m_math_ctlr = 0; m_math_overflow = 0; m_math_a = 0; |