Avoid loading nonsense value upon data abort.

This commit is contained in:
Thomas Harte 2024-04-22 22:09:57 -04:00
parent 265d151879
commit 56b65780d2
1 changed files with 3 additions and 1 deletions

View File

@ -339,7 +339,9 @@ struct Executor {
if constexpr (flags.transfer_byte()) {
uint8_t target;
did_read = bus.template read<uint8_t>(address, target, registers_.mode(), trans);
value = target;
if(did_read) {
value = target;
}
} else {
did_read = bus.template read<uint32_t>(address, value, registers_.mode(), trans);