wineoss: Make sure writepos < buflen for dsrender.

This commit is contained in:
Maarten Lankhorst 2007-07-24 18:23:42 +02:00 committed by Alexandre Julliard
parent 3c8c02a393
commit 7107a6969d

View File

@ -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);