Michael Stefaniuc : dmusic: Use DMUS_EVENT_SIZE() to calculate the size of the message.
Alexandre Julliard
julliard at winehq.org
Mon May 1 16:38:05 CDT 2017
Module: wine
Branch: master
Commit: 4fbae8eab482fc8d77e22bb487563746d280078b
URL: http://source.winehq.org/git/wine.git/?a=commit;h=4fbae8eab482fc8d77e22bb487563746d280078b
Author: Michael Stefaniuc <mstefani at winehq.org>
Date: Mon May 1 02:15:50 2017 +0200
dmusic: Use DMUS_EVENT_SIZE() to calculate the size of the message.
Suggested by Michael Müller.
Signed-off-by: Michael Stefaniuc <mstefani at winehq.org>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>
---
dlls/dmusic/buffer.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/dlls/dmusic/buffer.c b/dlls/dmusic/buffer.c
index bd0ad1a..eecacbb 100644
--- a/dlls/dmusic/buffer.c
+++ b/dlls/dmusic/buffer.c
@@ -100,7 +100,7 @@ static HRESULT WINAPI IDirectMusicBufferImpl_TotalTime(LPDIRECTMUSICBUFFER iface
static HRESULT WINAPI IDirectMusicBufferImpl_PackStructured(LPDIRECTMUSICBUFFER iface, REFERENCE_TIME ref_time, DWORD channel_group, DWORD channel_message)
{
IDirectMusicBufferImpl *This = impl_from_IDirectMusicBuffer(iface);
- DWORD new_write_pos = This->write_pos + sizeof(DMUS_EVENTHEADER) + sizeof(DWORD);
+ DWORD new_write_pos = This->write_pos + DMUS_EVENT_SIZE(sizeof(channel_message));
DMUS_EVENTHEADER header;
TRACE("(%p)->(0x%s, %u, 0x%x)\n", iface, wine_dbgstr_longlong(ref_time), channel_group, channel_message);
More information about the wine-cvs
mailing list