check for 0 to avoid division by 0

This commit is contained in:
Alug committed 2025-01-06 22:40:56 +01:00
1 parent 50593dbfc2
commit f4fa1fbd8c
1 file changed
+3
+3
View File
@@ -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)
{