From 8951490e9bfceacb5996e8acf8e413dbf53c6c50 Mon Sep 17 00:00:00 2001 From: RadekVana Date: Thu, 24 Nov 2022 18:37:00 +0100 Subject: [PATCH] eeprom: Fix footer encoding --- src/common/footer_eeprom.hpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/common/footer_eeprom.hpp b/src/common/footer_eeprom.hpp index 38e6be0465..02dbfcadcb 100644 --- a/src/common/footer_eeprom.hpp +++ b/src/common/footer_eeprom.hpp @@ -106,7 +106,7 @@ uint8_t GetCenterNAndFewer(); * @return constexpr uint32_t */ constexpr uint32_t Encode(record rec) { - uint32_t ret = uint32_t(rec[0]); + uint32_t ret = uint32_t(rec[0]) << count_of_trailing_ones; for (size_t i = 1; i < count; ++i) { ret |= uint32_t(rec[i]) << ((value_bit_size * i) + count_of_trailing_ones); }