summaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
author Miodrag Milanovic <mmicko@gmail.com>2016-01-26 08:31:27 +0100
committer Miodrag Milanovic <mmicko@gmail.com>2016-01-26 08:31:27 +0100
commitaaac8167d7c8845eae635752480d63824d1aaf82 (patch)
tree05cb9c2f688516bcf2faa014c181c7953ea699ee
parentc01f6b3c35fc38eecc533b1de9a2cea56876b299 (diff)
Fix for SteamLink build to compile error free (nw)
-rw-r--r--src/devices/bus/z88/z88.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/devices/bus/z88/z88.cpp b/src/devices/bus/z88/z88.cpp
index 7af6b781369..62313b76dd3 100644
--- a/src/devices/bus/z88/z88.cpp
+++ b/src/devices/bus/z88/z88.cpp
@@ -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);