aboutsummaryrefslogtreecommitdiff
path: root/src/adlmidi_xmi2mid.c
diff options
context:
space:
mode:
authorWohlstand <admin@wohlnet.ru>2017-11-12 07:32:11 +0300
committerWohlstand <admin@wohlnet.ru>2017-11-12 07:32:11 +0300
commitb043032a89f38e2b3191a65dab9ae4e8202d48f3 (patch)
treefa43cf8e88087b84aff825e8eaac40ff4587f2c3 /src/adlmidi_xmi2mid.c
parentcc2d7237cce71482c04895e5550609534e41413b (diff)
downloadlibADLMIDI-b043032a89f38e2b3191a65dab9ae4e8202d48f3.tar.gz
libADLMIDI-b043032a89f38e2b3191a65dab9ae4e8202d48f3.tar.bz2
libADLMIDI-b043032a89f38e2b3191a65dab9ae4e8202d48f3.zip
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
Diffstat (limited to 'src/adlmidi_xmi2mid.c')
-rw-r--r--src/adlmidi_xmi2mid.c4
1 files changed, 2 insertions, 2 deletions
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)