GBA: memory safety

This commit is contained in:
tildearrow 2024-03-18 13:36:24 -05:00
parent 5618a02b95
commit b27d99b1b0

View file

@ -345,6 +345,7 @@ int DivPlatformGBADMA::dispatch(DivCommand c) {
void DivPlatformGBADMA::updateWave(int ch) {
int addr=ch*256;
for (unsigned int i=0; i<chan[ch].audLen; i++) {
if (addr+i>=512) break;
wtMem[addr+i]=(signed char)(chan[ch].ws.output[i]-128);
}
}