check for 0 to avoid division by 0
This commit is contained in:
1 parent
50593dbfc2
commit
f4fa1fbd8c
1 file changed
+3
@@ -282,6 +282,9 @@ static Mix_Chunk *ds2chunk(void *stream)
|
||||
freq = READUINT16(stream);
|
||||
samples = READUINT32(stream);
|
||||
|
||||
if (freq == 0)
|
||||
return NULL; // division by zero
|
||||
|
||||
// convert from signed 8bit ???hz to signed 16bit 44100hz.
|
||||
switch(freq)
|
||||
{
|
||||
|
||||
Reference in new issue
Block a user