From 839dc9f939901e158ec4928fa18cad298368597d Mon Sep 17 00:00:00 2001 From: stijn Date: Mon, 24 Sep 2018 11:11:22 +0200 Subject: [PATCH] Fix conversion from 'size_t' to 'unsigned int' --- lodepng.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lodepng.cpp b/lodepng.cpp index 2b12fb57..ee7aa7dc 100644 --- a/lodepng.cpp +++ b/lodepng.cpp @@ -3785,7 +3785,7 @@ unsigned lodepng_get_color_profile(LodePNGColorProfile* profile, for(i = 0; i < profile->numcolors; i++) { const unsigned char* color = &profile->palette[i * 4]; - color_tree_add(&tree, color[0], color[1], color[2], color[3], i); + color_tree_add(&tree, color[0], color[1], color[2], color[3], static_cast(i)); } } @@ -4840,7 +4840,7 @@ static unsigned readChunk_iCCP(LodePNGInfo* info, const LodePNGDecompressSetting (unsigned char*)(&data[string2_begin]), length, zlibsettings); if(!error) { - info->iccp_profile_size = decoded.size; + info->iccp_profile_size = static_cast(decoded.size); info->iccp_profile = (unsigned char*)lodepng_malloc(decoded.size); if(info->iccp_profile) { memcpy(info->iccp_profile, decoded.data, decoded.size);