From 532cb40665742b99f9bedc9a21362be5ea6b4806 Mon Sep 17 00:00:00 2001 From: kaldoran <kaldoran@live.fr> Date: Thu, 3 Mar 2016 19:27:00 +0000 Subject: [PATCH] Correction of error on commonBits --- include/opendht/indexation/pht.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/opendht/indexation/pht.h b/include/opendht/indexation/pht.h index 2e687cba..4e1d667a 100644 --- a/include/opendht/indexation/pht.h +++ b/include/opendht/indexation/pht.h @@ -87,7 +87,7 @@ struct Prefix { auto longest_prefix_size = std::min(p1.size_, p2.size_); for (i = 0; i < longest_prefix_size; i++) { - if (p1.content_.data()[i] != p2.content_.data()[i]) + if (p1.content_.data()[i] != p2.content_.data()[i] || i == longest_prefix_size) break; } -- GitLab