diff --git a/include/msg/field.hpp b/include/msg/field.hpp index 4ea8d070..4ee6c2bc 100644 --- a/include/msg/field.hpp +++ b/include/msg/field.hpp @@ -215,7 +215,7 @@ struct bits_locator_t { template constexpr static auto extent_in() -> std::size_t { constexpr auto msb = Lsb + BitSize - 1; constexpr auto msb_extent = (msb + CHAR_BIT - 1) / CHAR_BIT; - constexpr auto base_extent = Index * sizeof(std::uint32_t); + constexpr auto base_extent = Index * sizeof(T); constexpr auto extent = base_extent + msb_extent; return (extent + sizeof(T) - 1) / sizeof(T); }