diff --git a/dlls/winmm/wineoss/audio.c b/dlls/winmm/wineoss/audio.c
index f7de208a469793652afa5588af458a1235676fac..c589cbad348e340b80ee69d3e5ef1f82d25d41fa 100644
--- a/dlls/winmm/wineoss/audio.c
+++ b/dlls/winmm/wineoss/audio.c
@@ -32,7 +32,7 @@
 DEFAULT_DEBUG_CHANNEL(wave)
 
 /* Allow 1% deviation for sample rates (some ES137x cards) */
-#define NEAR_MATCH(rate1,rate2) (((100*(rate1-rate2))/rate1)==0)
+#define NEAR_MATCH(rate1,rate2) (((100*((int)(rate1)-(int)(rate2)))/(rate1))==0)
 
 #ifdef HAVE_OSS