Commit 3be10b04 authored by Robert Reif's avatar Robert Reif Committed by Alexandre Julliard

Avoid divide by zero if the sound driver returns 0 for speed.

parent b3ca47c6
......@@ -608,7 +608,7 @@ static BOOL OSS_WaveOutInit(OSS_DEVICE* ossdev)
rc=ioctl(ossdev->fd, SNDCTL_DSP_SPEED, &arg);
TRACE("DSP_SPEED: rc=%d returned %d for %dx%dx%d\n",
rc,arg,win_std_rates[r],win_std_oss_fmts[f],c+1);
if (rc==0 && NEAR_MATCH(arg,win_std_rates[r]))
if (rc==0 && arg!=0 && NEAR_MATCH(arg,win_std_rates[r]))
ossdev->out_caps.dwFormats|=win_std_formats[f][c][r];
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment