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 c0e8264..e2d3297 100644
--- a/lodepng.cpp
+++ b/lodepng.cpp
@@ -814,7 +814,7 @@ unsigned lodepng_huffman_code_lengths(unsigned* lengths, const unsigned* frequen
for(i = 0; i + 1 < numprev; i += 2)
{
/*merge prev_row[i] and prev_row[i + 1] into new coin*/
- Coin* coin = &coins[numcoins]++;
+ Coin* coin = &coins[numcoins++];
coin_copy(coin, &prev_row[i]);
add_coins(coin, &prev_row[i + 1]);
}