Maarten Lankhorst : dsound: Fix division by zero in DSOUND_Calc3DBuffer.

Alexandre Julliard julliard at wine.codeweavers.com
Mon Jul 9 10:24:56 CDT 2007


Module: wine
Branch: master
Commit: a6ab4c51cfcceb592ff6225ca9d40a9fc4dc9b97
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=a6ab4c51cfcceb592ff6225ca9d40a9fc4dc9b97

Author: Maarten Lankhorst <m.b.lankhorst at gmail.com>
Date:   Sun Jul  8 16:38:05 2007 +0200

dsound: Fix division by zero in DSOUND_Calc3DBuffer.

---

 dlls/dsound/sound3d.c |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)

diff --git a/dlls/dsound/sound3d.c b/dlls/dsound/sound3d.c
index cae1c28..4a26947 100644
--- a/dlls/dsound/sound3d.c
+++ b/dlls/dsound/sound3d.c
@@ -238,6 +238,9 @@ void DSOUND_Calc3DBuffer(IDirectSoundBufferImpl *dsb)
 			/* my test show that for my way of calc., we need only half of angles */
 			DWORD dwInsideConeAngle = dsb->ds3db_ds3db.dwInsideConeAngle/2;
 			DWORD dwOutsideConeAngle = dsb->ds3db_ds3db.dwOutsideConeAngle/2;
+			if (dwOutsideConeAngle == dwInsideConeAngle)
+				++dwOutsideConeAngle;
+
 			/* full volume */
 			if (flAngle < dwInsideConeAngle)
 				flAngle = dwInsideConeAngle;




More information about the wine-cvs mailing list