From 7107a6969d2c2f163d991356a2f5237d2bbb1173 Mon Sep 17 00:00:00 2001 From: Maarten Lankhorst Date: Tue, 24 Jul 2007 18:23:42 +0200 Subject: [PATCH] wineoss: Make sure writepos < buflen for dsrender. --- dlls/wineoss.drv/dsrender.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dlls/wineoss.drv/dsrender.c b/dlls/wineoss.drv/dsrender.c index f73624eb46d..aa9d373cbe0 100644 --- a/dlls/wineoss.drv/dsrender.c +++ b/dlls/wineoss.drv/dsrender.c @@ -579,7 +579,7 @@ static HRESULT WINAPI IDsDriverBufferImpl_GetPosition(PIDSDRIVERBUFFER iface, *lpdwWrite = ptr + 32; else *lpdwWrite = ptr + WOutDev[This->drv->wDevID].dwFragmentSize; - while (*lpdwWrite > This->buflen) + while (*lpdwWrite >= This->buflen) *lpdwWrite -= This->buflen; } TRACE("playpos=%d, writepos=%d\n", lpdwPlay?*lpdwPlay:0, lpdwWrite?*lpdwWrite:0);