From 188947bcc73ce38ab1c3cf9d01015ca8a29decd9 Mon Sep 17 00:00:00 2001 From: Jung-Sang Ahn Date: Thu, 10 Aug 2023 13:27:37 -0700 Subject: [PATCH] Fix a bug in log_entry constructor (#456) --- src/log_entry.cxx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/log_entry.cxx b/src/log_entry.cxx index 72c9b20a..ae158e8c 100644 --- a/src/log_entry.cxx +++ b/src/log_entry.cxx @@ -16,10 +16,10 @@ log_entry::log_entry(ulong term, , has_crc32_(has_crc32) , crc32_(crc32) { - if (!buff_ && !has_crc32 && compute_crc) { + if (buff_ && !has_crc32 && compute_crc) { has_crc32_ = true; - crc32_ = crc32_8( buff->data_begin(), - buff->size(), + crc32_ = crc32_8( buff_->data_begin(), + buff_->size(), 0 ); } }