Skip to content

Commit

Permalink
Fix conversion from 'size_t' to 'unsigned int'
Browse files Browse the repository at this point in the history
  • Loading branch information
stinos committed Sep 24, 2018
1 parent 677f739 commit 839dc9f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lodepng.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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<unsigned>(i));
}
}

Expand Down Expand Up @@ -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<unsigned>(decoded.size);
info->iccp_profile = (unsigned char*)lodepng_malloc(decoded.size);
if(info->iccp_profile) {
memcpy(info->iccp_profile, decoded.data, decoded.size);
Expand Down

0 comments on commit 839dc9f

Please sign in to comment.