ES5506: fix memory overflow

issue #2422
This commit is contained in:
tildearrow 2025-03-21 16:01:07 -05:00
parent 97d6b00322
commit 4546df5636

View file

@ -1342,7 +1342,7 @@ void DivPlatformES5506::renderSamples(int sysID) {
length=4194304-128;
}
if ((memPos&0xc00000)!=((memPos+length+128)&0xc00000)) {
memPos=((memPos+0x3fffff)&0xc00000)+128;
memPos=((memPos+0x3fffff)&0xffc00000)+128;
}
if (memPos>=(getSampleMemCapacity()-128)) {
logW("out of ES5506 memory for sample %d!",i);