diff options
-rw-r--r-- | lodepng.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lodepng.cpp b/lodepng.cpp index 1b1a0bd..355cd82 100644 --- a/lodepng.cpp +++ b/lodepng.cpp @@ -629,7 +629,7 @@ static unsigned HuffmanTree_makeFromLengths2(HuffmanTree* tree) /*step 3: generate all the codes*/ for(unsigned n = 0; n != tree->numcodes; ++n) { - if(tree->lengths[n] != 0) tree->tree1d[n] = ++nextcode.data[tree->lengths[n]]; + if(tree->lengths[n] != 0) tree->tree1d[n] = nextcode.data[tree->lengths[n]]++; } } |