From 4fbae8eab482fc8d77e22bb487563746d280078b Mon Sep 17 00:00:00 2001 From: Michael Stefaniuc Date: Mon, 1 May 2017 02:15:50 +0200 Subject: [PATCH] dmusic: Use DMUS_EVENT_SIZE() to calculate the size of the message. MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Suggested by Michael Müller. Signed-off-by: Michael Stefaniuc Signed-off-by: Alexandre Julliard --- 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 bd0ad1ac0f5..eecacbb2d84 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); -- 2.11.4.GIT