Debugger: Fixed out-of-bounds memory access in disassembler

This commit is contained in:
Sour 2019-07-01 18:35:21 -04:00
parent cbeaa18c7d
commit da031ab697

View file

@ -234,7 +234,7 @@ void Disassembler::Disassemble(CpuType cpuType)
}
if(needRealign) {
for(int j = 1; j < opSize; j++) {
for(int j = 1, max = (int)(*cache).size(); j < opSize && addrInfo.Address + j < max; j++) {
if((*cache)[addrInfo.Address + j].IsInitialized()) {
break;
}