diff --git a/InstructionSets/M50740/Executor.cpp b/InstructionSets/M50740/Executor.cpp index 546054340..2d1581bbf 100644 --- a/InstructionSets/M50740/Executor.cpp +++ b/InstructionSets/M50740/Executor.cpp @@ -44,7 +44,7 @@ Executor::Executor(PortHandler &port_handler) : port_handler_(port_handler) { void Executor::set_rom(const std::vector &rom) { // Copy into place, and reset. const auto length = std::min(size_t(0x1000), rom.size()); - std::copy(rom.begin(), rom.begin() + ptrdiff_t(length), memory_.begin() + 0x2000 - length); + std::copy(rom.begin(), rom.begin() + ptrdiff_t(length), memory_.end() - length); reset(); }