summaryrefslogtreecommitdiffstatshomepage
path: root/src/devices/bus/pce/pce_slot.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/devices/bus/pce/pce_slot.cpp')
-rw-r--r--src/devices/bus/pce/pce_slot.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/devices/bus/pce/pce_slot.cpp b/src/devices/bus/pce/pce_slot.cpp
index b9a65757afa..8f52410a1a3 100644
--- a/src/devices/bus/pce/pce_slot.cpp
+++ b/src/devices/bus/pce/pce_slot.cpp
@@ -321,15 +321,15 @@ std::string pce_cart_slot_device::get_default_card_software(get_default_card_sof
{
if (hook.image_file())
{
- const char *slot_string;
- uint32_t len = hook.image_file()->size();
+ uint64_t len;
+ hook.image_file()->length(len); // FIXME: check error return, guard against excessively large files
std::vector<uint8_t> rom(len);
- int type;
- hook.image_file()->read(&rom[0], len);
+ size_t actual;
+ hook.image_file()->read(&rom[0], len, actual); // FIXME: check error return or read returning short
- type = get_cart_type(&rom[0], len);
- slot_string = pce_get_slot(type);
+ int const type = get_cart_type(&rom[0], len);
+ char const *const slot_string = pce_get_slot(type);
//printf("type: %s\n", slot_string);