From 3be10b04580d34288dc4299ef6eefd9a2c261ef6 Mon Sep 17 00:00:00 2001 From: Robert Reif Date: Thu, 25 Sep 2003 20:23:52 +0000 Subject: [PATCH] Avoid divide by zero if the sound driver returns 0 for speed. --- dlls/winmm/wineoss/audio.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dlls/winmm/wineoss/audio.c b/dlls/winmm/wineoss/audio.c index b570a487cb7..0e821d6156a 100644 --- a/dlls/winmm/wineoss/audio.c +++ b/dlls/winmm/wineoss/audio.c @@ -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]; } }