From 4e0e2244b3831cc2e4c3954c07fbb23a241f253e Mon Sep 17 00:00:00 2001 From: Dmitry Gorbachev Date: Sun, 27 Sep 2009 11:56:35 +0000 Subject: [PATCH] Fix undefined behavior, already fixed in Wine. svn path=/trunk/; revision=43183 --- reactos/dll/directx/dsound/capture.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/reactos/dll/directx/dsound/capture.c b/reactos/dll/directx/dsound/capture.c index 2a8252f9c0f..312c90f92cd 100644 --- a/reactos/dll/directx/dsound/capture.c +++ b/reactos/dll/directx/dsound/capture.c @@ -428,7 +428,7 @@ DSOUND_capture_callback(HWAVEIN hwi, UINT msg, DWORD_PTR dwUser, DWORD_PTR dw1, 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;