Merge pull request #6620 from tlindner/fix-coco-rom-load

Fix CoCo cartridge loading for less than 16k carts.
This commit is contained in:
ajrhacker 2020-04-30 20:55:15 -04:00 committed by GitHub
commit 849c4d46c7
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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;
}