Fix (Linux) 64-bit crash in CEZ3 (playback of sfx_litng3).

This commit is contained in:
ilag11111 2014-04-25 00:37:13 -07:00
parent 5b5fbe9aad
commit 60a115b0a7
1 changed files with 1 additions and 1 deletions

View File

@ -152,7 +152,7 @@ static Mix_Chunk *ds2chunk(void *stream)
if (!(frac & 0xFFFF)) // other solid multiples (change if FRACBITS != 16)
newsamples = samples * (frac >> FRACBITS);
else // strange and unusual fractional frequency steps, plus anything higher than 44100hz.
newsamples = FixedMul(frac, samples) + 1; // add 1 sample for security! the code below rounds up.
newsamples = FixedMul(frac, samples) + 2; // add 2 samples for security! the code below rounds up.
if (newsamples >= UINT32_MAX>>2)
return NULL; // would and/or did wrap, can't store.
break;