From: clyne Date: Wed, 1 Jul 2020 23:42:43 +0000 (-0400) Subject: Added missing deallocation X-Git-Url: https://code.bitgloo.com/?a=commitdiff_plain;h=40fc0b29f5fd4a8d2ddecc60d74d1b50390b2366;p=clyne%2Fconsteval-huffman.git Added missing deallocation --- diff --git a/consteval_huffman.hpp b/consteval_huffman.hpp index b7ea819..7c1aabf 100644 --- a/consteval_huffman.hpp +++ b/consteval_huffman.hpp @@ -130,8 +130,10 @@ private: output[bytes - 1] |= (1 << bits); if (++bits == 8) { bits = 0; - if (--bytes == 0) - return; + if (--bytes == 0) { + i = 1; + break; + } } leaf = parent; }