From 8e04f74bba44816dc8e1c98495cd868157efc86a Mon Sep 17 00:00:00 2001 From: Phuntsok Drak-pa Date: Sat, 9 Jun 2018 03:30:37 +0200 Subject: [PATCH] bugfix --- src/bitpack.cc | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/bitpack.cc b/src/bitpack.cc index cad6111..1ea172d 100644 --- a/src/bitpack.cc +++ b/src/bitpack.cc @@ -50,7 +50,9 @@ vuchar pack_n(const vuint16::const_iterator t_input_begin, for (auto it = t_input_begin; it != t_input_end; ++it) { if (*t_input_end >= max_value) { - ret.push_back(current_char); + if(current_char != 0) { + ret.push_back(current_char); + } const auto next_vec = pack_n(it, t_input_end, t_n + 1); ret.insert(ret.end(), next_vec.begin(), next_vec.end()); return ret;