mirror of
https://github.com/tildearrow/furnace.git
synced 2024-11-01 02:22:39 +00:00
SegaPCM: fix possible crash
This commit is contained in:
parent
8c5659b5d0
commit
79b418c031
1 changed files with 5 additions and 1 deletions
|
@ -480,7 +480,11 @@ void DivPlatformSegaPCM::renderSamples(int sysID) {
|
|||
if (memPos>=16777216) break;
|
||||
sampleOffSegaPCM[i]=memPos;
|
||||
for (unsigned int j=0; j<alignedSize; j++) {
|
||||
if (j>=sample->samples) {
|
||||
sampleMem[memPos++]=0;
|
||||
} else {
|
||||
sampleMem[memPos++]=((unsigned char)sample->data8[j]+0x80);
|
||||
}
|
||||
sampleEndSegaPCM[i]=((memPos+0xff)>>8)-1;
|
||||
if (memPos>=16777216) break;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue