diff options
author | Fabio Priuli <etabeta78@users.noreply.github.com> | 2014-09-23 06:18:02 +0000 |
---|---|---|
committer | Fabio Priuli <etabeta78@users.noreply.github.com> | 2014-09-23 06:18:02 +0000 |
commit | 69fdbd5872c68ca59858fdfd28f1a765625d308c (patch) | |
tree | ea75e63a6a67d1044e6d3ba67f1f31a153018bee /src/emu/bus/gba/gba_slot.c | |
parent | af251eb276b7936c8ff095e163a5c3c7fc42b39a (diff) |
fixed multisession crash when the new cart needed a dynamic buffer/array
larger than the original one. this got introduced when converting from
auto_alloc_array to dynamic buffers, because such buffers are not made
NULL at reset, but got unnoticed/unreported up to now. many thanks to
Trebor for catching it! nw.
Diffstat (limited to 'src/emu/bus/gba/gba_slot.c')
-rw-r--r-- | src/emu/bus/gba/gba_slot.c | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/src/emu/bus/gba/gba_slot.c b/src/emu/bus/gba/gba_slot.c index 355651447cf..53aad440dd9 100644 --- a/src/emu/bus/gba/gba_slot.c +++ b/src/emu/bus/gba/gba_slot.c @@ -46,11 +46,8 @@ device_gba_cart_interface::~device_gba_cart_interface() void device_gba_cart_interface::nvram_alloc(UINT32 size) { - if (m_nvram == NULL) - { - m_nvram.resize(size/sizeof(UINT32)); - device().save_item(NAME(m_nvram)); - } + m_nvram.resize(size/sizeof(UINT32)); + device().save_item(NAME(m_nvram)); } @@ -239,7 +236,7 @@ void gba_cart_slot_device::call_unload() bool gba_cart_slot_device::call_softlist_load(software_list_device &swlist, const char *swname, const rom_entry *start_entry) { - load_software_part_region(*this, swlist, swname, start_entry ); + load_software_part_region(*this, swlist, swname, start_entry); return TRUE; } |