diff options
author | Wohlstand <admin@wohlnet.ru> | 2017-10-21 14:37:45 +0300 |
---|---|---|
committer | Wohlstand <admin@wohlnet.ru> | 2017-10-21 14:37:45 +0300 |
commit | 490bac7421b5345e5b9035f1430520c751935534 (patch) | |
tree | 727b1e6fb54439de92a3339cdb02a387cb80a47b /src/adlmidi_xmi2mid.c | |
parent | 352660262dfd05cc75b5f2099507c9f29953a270 (diff) | |
download | libADLMIDI-490bac7421b5345e5b9035f1430520c751935534.tar.gz libADLMIDI-490bac7421b5345e5b9035f1430520c751935534.tar.bz2 libADLMIDI-490bac7421b5345e5b9035f1430520c751935534.zip |
Fixed MSVC2015 build
Diffstat (limited to 'src/adlmidi_xmi2mid.c')
-rw-r--r-- | src/adlmidi_xmi2mid.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/adlmidi_xmi2mid.c b/src/adlmidi_xmi2mid.c index 9c93957..083b5ed 100644 --- a/src/adlmidi_xmi2mid.c +++ b/src/adlmidi_xmi2mid.c @@ -119,7 +119,7 @@ static void copy(struct xmi_ctx *ctx, char *b, uint32_t len) #define DST_CHUNK 8192 static void resize_dst(struct xmi_ctx *ctx) { - uint32_t pos = ctx->dst_ptr - ctx->dst; + uint32_t pos = (uint32_t)(ctx->dst_ptr - ctx->dst); ctx->dst = realloc(ctx->dst, ctx->dstsize + DST_CHUNK); ctx->dstsize += DST_CHUNK; ctx->dstrem += DST_CHUNK; @@ -175,7 +175,7 @@ static void skipdst(struct xmi_ctx *ctx, int32_t pos) { newpos = ctx->dst_ptr - ctx->dst; while (ctx->dstsize < newpos) resize_dst(ctx); - ctx->dstrem = ctx->dstsize - newpos; + ctx->dstrem = (uint32_t)(ctx->dstsize - newpos); } static uint32_t getsrcsize(struct xmi_ctx *ctx) { @@ -183,11 +183,11 @@ static uint32_t getsrcsize(struct xmi_ctx *ctx) { } static uint32_t getsrcpos(struct xmi_ctx *ctx) { - return (ctx->src_ptr - ctx->src); + return (uint32_t)(ctx->src_ptr - ctx->src); } static uint32_t getdstpos(struct xmi_ctx *ctx) { - return (ctx->dst_ptr - ctx->dst); + return (uint32_t)(ctx->dst_ptr - ctx->dst); } /* This is a default set of patches to convert from MT32 to GM |