From 40fc0b29f5fd4a8d2ddecc60d74d1b50390b2366 Mon Sep 17 00:00:00 2001 From: clyne Date: Wed, 1 Jul 2020 19:42:43 -0400 Subject: [PATCH] Added missing deallocation --- consteval_huffman.hpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) 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; }