Skip to content

Commit

Permalink
eeprom: Fix footer encoding
Browse files Browse the repository at this point in the history
  • Loading branch information
RadekVana authored and JohnnyDeer committed Nov 25, 2022
1 parent 92e9d41 commit 8951490
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/common/footer_eeprom.hpp
Expand Up @@ -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);
}
Expand Down

0 comments on commit 8951490

Please sign in to comment.