foxygit / doom Log in
commit 74cd516fa5c9a90e73d297d41c30f62b1f2da48f
Author:     ceski <56656010+ceski-1@users.noreply.github.com>
AuthorDate: Tue May 16 12:06:21 2023 -0700
Commit:     ceski <56656010+ceski-1@users.noreply.github.com>
CommitDate: Tue May 16 12:06:21 2023 -0700

    Use explicit casting for `MAKE_EVT` macro
---
 src/i_winmusic.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/src/i_winmusic.c b/src/i_winmusic.c
index c3635e2b..3f00bdf3 100644
--- a/src/i_winmusic.c
+++ b/src/i_winmusic.c
@@ -140,7 +140,8 @@ static buffer_t buffer;

 #define STREAM_MAX_EVENTS   4

-#define MAKE_EVT(a, b, c, d) ((DWORD)((a) | ((b) << 8) | ((c) << 16) | ((d) << 24)))
+#define MAKE_EVT(a, b, c, d)                                                   \
+    ((DWORD)(a) | ((DWORD)(b) << 8) | ((DWORD)(c) << 16) | ((DWORD)(d) << 24))

 #define PADDED_SIZE(x) (((x) + sizeof(DWORD) - 1) & ~(sizeof(DWORD) - 1))