another overflow fix (see #1017)

This commit is contained in:
thrust26 2024-03-03 11:56:45 +01:00
parent 92a7137d01
commit a311e1d714
2 changed files with 5 additions and 4 deletions

View File

@ -300,7 +300,7 @@ class CartDebug : public DebuggerSystem
struct ReservedEquates {
std::array<bool, 16> TIARead{false};
std::array<bool, 64> TIAWrite{false};
std::array<bool, 128> IOReadWrite{false};
std::array<bool, 32> IOReadWrite{false};
std::array<bool, 128> ZPRAM{false};
AddrToLabel Label{};
bool breakFound{false};

View File

@ -126,10 +126,11 @@ class DiStella
else
myReserved.TIAWrite[addr & 0x3F] = true;
}
else if (labfound == AddressType::RIOT)
myReserved.IOReadWrite[(addr & 0xFF) - 0x80] = true;
else if(labfound == AddressType::RIOT) {
myReserved.IOReadWrite[addr & 0x1F] = true;
}
else if (labfound == AddressType::ZP_RAM)
myReserved.ZPRAM[(addr & 0xFF) - 0x80] = true;
myReserved.ZPRAM[addr & 0x7F] = true;
}
private: