summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lodepng.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/lodepng.cpp b/lodepng.cpp
index e2d3297..f863a02 100644
--- a/lodepng.cpp
+++ b/lodepng.cpp
@@ -4788,7 +4788,7 @@ static unsigned addChunk_tRNS(ucvector* out, const LodePNGColorMode* info)
{
size_t amount = info->palettesize;
/*the tail of palette values that all have 255 as alpha, does not have to be encoded*/
- for(size_t i = info->palettesize; i < 0; --i)
+ for(size_t i = info->palettesize; i != 0; --i)
{
if(info->palette[4 * (i - 1) + 3] == 255) --amount;
else break;