From 61f3af53d0c9f083656f9b68e172302274866f6b Mon Sep 17 00:00:00 2001 From: smf- Date: Thu, 17 Oct 2024 14:39:55 +0100 Subject: fix error handling (nw) --- src/devices/bus/gameboy/mdslot.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/devices/bus/gameboy/mdslot.cpp b/src/devices/bus/gameboy/mdslot.cpp index 7339d139c1b..a14ad8067f1 100644 --- a/src/devices/bus/gameboy/mdslot.cpp +++ b/src/devices/bus/gameboy/mdslot.cpp @@ -126,7 +126,7 @@ std::pair megaduck_cart_slot_device::load_ima memory_region *const romregion = machine().memory().region_alloc(subtag("rom"), len, 1, ENDIANNESS_LITTLE); auto const [err, actual] = read_at(file, 0, romregion->base(), len); if (err || (len != actual)) - std::make_pair(err ? err : std::errc::io_error, "Error reading cartridge file"); + return std::make_pair(err ? err : std::errc::io_error, "Error reading cartridge file"); } return std::make_pair(std::error_condition(), std::string()); -- cgit v1.2.3