]> code.bitgloo.com Git - clyne/consteval-huffman.git/commitdiff
Added missing deallocation
authorclyne <clyne@bitgloo.com>
Wed, 1 Jul 2020 23:42:43 +0000 (19:42 -0400)
committerGitHub <noreply@github.com>
Wed, 1 Jul 2020 23:42:43 +0000 (19:42 -0400)
consteval_huffman.hpp

index b7ea81999d52de4551adce96d188d21aae20dd92..7c1aabf415748c8999c695e82a46b8890c0e93a9 100644 (file)
@@ -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;
             }