1
0
mirror of https://github.com/TomHarte/CLK.git synced 2026-01-23 01:16:10 +00:00

More clearly encode that this is a copy-to-the-right.

This commit is contained in:
Thomas Harte
2025-12-07 20:40:46 -05:00
parent db48fc6ec1
commit 886f153a3e

View File

@@ -44,7 +44,7 @@ Executor::Executor(PortHandler &port_handler) : port_handler_(port_handler) {
void Executor::set_rom(const std::vector<uint8_t> &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();
}