diff options
author | SlowRiot <rain.backnet@gmail.com> | 2014-11-27 05:16:52 +0000 |
---|---|---|
committer | SlowRiot <rain.backnet@gmail.com> | 2014-11-27 05:16:52 +0000 |
commit | 10bb7cafbd37b21ef404d7c5273ebde4d6be6402 (patch) | |
tree | a2ce70a8f86fdb223b5cebd990a25352f2db0d6b | |
parent | e205cb35be0d53730ee8c8c8082255d3f50c5d12 (diff) |
fixing preincrement bug introduced previously
-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]]++; } } |