From 744bf587fd7f117ba4884fe3406be4237dd92a8c Mon Sep 17 00:00:00 2001 From: Vitaly Novichkov Date: Mon, 25 Jun 2018 03:04:33 +0300 Subject: Using bigger integers for math in some places --- src/cvt_mus2mid.hpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/cvt_mus2mid.hpp') diff --git a/src/cvt_mus2mid.hpp b/src/cvt_mus2mid.hpp index 5a465c2..b5096c6 100644 --- a/src/cvt_mus2mid.hpp +++ b/src/cvt_mus2mid.hpp @@ -167,10 +167,10 @@ static void mus2mid_write4(struct mus_ctx *ctx, uint32_t val) { if (ctx->dstrem < 4) mus2mid_resize_dst(ctx); - *ctx->dst_ptr++ = (val>>24)&0xff; - *ctx->dst_ptr++ = (val>>16)&0xff; - *ctx->dst_ptr++ = (val>>8) & 0xff; - *ctx->dst_ptr++ = val & 0xff; + *ctx->dst_ptr++ = (uint8_t)((val>>24)&0xff); + *ctx->dst_ptr++ = (uint8_t)((val>>16)&0xff); + *ctx->dst_ptr++ = (uint8_t)((val>>8) & 0xff); + *ctx->dst_ptr++ = (uint8_t)((val & 0xff)); ctx->dstrem -= 4; } -- cgit v1.2.3