Author: dgorbachev
Date: Sun Sep 27 13:56:35 2009
New Revision: 43183
URL:
http://svn.reactos.org/svn/reactos?rev=43183&view=rev
Log:
Fix undefined behavior, already fixed in Wine.
Modified:
trunk/reactos/dll/directx/dsound/capture.c
Modified: trunk/reactos/dll/directx/dsound/capture.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/directx/dsound/capture…
==============================================================================
--- trunk/reactos/dll/directx/dsound/capture.c [iso-8859-1] (original)
+++ trunk/reactos/dll/directx/dsound/capture.c [iso-8859-1] Sun Sep 27 13:56:35 2009
@@ -428,7 +428,7 @@
if (This->state == STATE_STARTING)
This->state = STATE_CAPTURING;
capture_CheckNotify(Moi, (DWORD_PTR)This->pwave[index].lpData -
(DWORD_PTR)This->buffer, This->pwave[index].dwBufferLength);
- This->index = (++This->index) % This->nrofpwaves;
+ This->index = (This->index + 1) % This->nrofpwaves;
if ( (This->index == 0) && !(This->capture_buffer->flags &
DSCBSTART_LOOPING) ) {
TRACE("end of buffer\n");
This->state = STATE_STOPPED;