From b2a956d461082111a4d9aa5d33e41c36b333ab8a Mon Sep 17 00:00:00 2001 From: kaldoran <kaldoran@live.fr> Date: Thu, 14 Jul 2016 17:38:33 -0400 Subject: [PATCH] Correction of the size of the prefix, now size does not include the size of the padding --- include/opendht/indexation/pht.h | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/include/opendht/indexation/pht.h b/include/opendht/indexation/pht.h index caaa7e5b..85d79b4b 100644 --- a/include/opendht/indexation/pht.h +++ b/include/opendht/indexation/pht.h @@ -261,10 +261,8 @@ private: Prefix p = Blob {k.begin()->second.begin(), k.begin()->second.end()}; auto bit_loc = p.size_ + 1; - for ( auto i = p.content_.size(); i <= keySpec_.begin()->second; i++ ) { + for ( auto i = p.content_.size(); i <= keySpec_.begin()->second; i++ ) p.content_.push_back(0); - p.size_ += 8; - } return p.swapBit(bit_loc); }; -- GitLab