From c8d87e8a24f512b2826c9af7596615af7e4c335d Mon Sep 17 00:00:00 2001 From: Alexey Milovidov Date: Thu, 3 Mar 2016 23:48:04 +0300 Subject: [PATCH] Better [#METR-18510]. --- dbms/src/Interpreters/Cluster.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dbms/src/Interpreters/Cluster.cpp b/dbms/src/Interpreters/Cluster.cpp index 6fdfaf90ceb..bf30b1ca98f 100644 --- a/dbms/src/Interpreters/Cluster.cpp +++ b/dbms/src/Interpreters/Cluster.cpp @@ -374,7 +374,7 @@ void Cluster::assignName() SHA512_Init(&ctx); for (const auto & host : elements) - SHA512_Update(&ctx, reinterpret_cast(host.data()), host.size()); + SHA512_Update(&ctx, reinterpret_cast(host.c_str()), host.size() + 1); SHA512_Final(hash, &ctx);