summaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
-rw-r--r--src/devices/bus/coco/cococart.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/devices/bus/coco/cococart.cpp b/src/devices/bus/coco/cococart.cpp
index c97c770eea7..1cb97210e34 100644
--- a/src/devices/bus/coco/cococart.cpp
+++ b/src/devices/bus/coco/cococart.cpp
@@ -450,7 +450,7 @@ image_init_result cococart_slot_device::call_load()
while (read_length < cart_length)
{
- offs_t len = std::min(read_length, m_cart->get_cart_size() - read_length);
+ offs_t len = std::min(read_length, cart_length - read_length);
memcpy(base + read_length, base, len);
read_length += len;
}