Fix for SteamLink build to compile error free (nw)

This commit is contained in:
Miodrag Milanovic 2016-01-26 08:31:27 +01:00
parent c01f6b3c35
commit aaac8167d7

View File

@ -158,7 +158,11 @@ bool z88cart_slot_device::call_load()
void z88cart_slot_device::call_unload()
{
if (m_cart)
memset(m_cart->get_cart_base(), 0xff, m_cart->get_cart_size());
{
auto cart_size = m_cart->get_cart_size();
if (cart_size>0)
memset(m_cart->get_cart_base(), 0xff, cart_size);
}
// open the flap
m_out_flp_cb(ASSERT_LINE);