From b043032a89f38e2b3191a65dab9ae4e8202d48f3 Mon Sep 17 00:00:00 2001 From: Wohlstand Date: Sun, 12 Nov 2017 07:32:11 +0300 Subject: libADLMIDI now is buildable under OpenWatcom except of some workarounds - Need a different way to create a static library, otherwise it don't wanna be built. - Needed a different custom STL containers (std::vector and std::set) implementation that will work and will don't glitch with a crashes --- src/adlmidi_xmi2mid.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/adlmidi_xmi2mid.c') diff --git a/src/adlmidi_xmi2mid.c b/src/adlmidi_xmi2mid.c index 4fae2a2..896b3d9 100644 --- a/src/adlmidi_xmi2mid.c +++ b/src/adlmidi_xmi2mid.c @@ -98,7 +98,7 @@ static uint32_t read2(struct xmi_ctx *ctx) uint8_t b0, b1; b0 = *ctx->src_ptr++; b1 = *ctx->src_ptr++; - return (b0 + (b1 << 8)); + return (b0 + ((uint32_t)b1 << 8)); } static uint32_t read4(struct xmi_ctx *ctx) @@ -108,7 +108,7 @@ static uint32_t read4(struct xmi_ctx *ctx) b2 = *ctx->src_ptr++; b1 = *ctx->src_ptr++; b0 = *ctx->src_ptr++; - return (b0 + (b1<<8) + (b2<<16) + (b3<<24)); + return (b0 + ((uint32_t)b1<<8) + ((uint32_t)b2<<16) + ((uint32_t)b3<<24)); } static void copy(struct xmi_ctx *ctx, char *b, uint32_t len) -- cgit v1.2.3