Skip to content

Commit 699fb9d

Browse files
committed
fix: base extent relies on size of T and not std::uint32_t
Signed-off-by: Sam Van Gysegem <[email protected]>
1 parent 0bfa908 commit 699fb9d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

include/msg/field.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -215,7 +215,7 @@ struct bits_locator_t {
215215
template <typename T> constexpr static auto extent_in() -> std::size_t {
216216
constexpr auto msb = Lsb + BitSize - 1;
217217
constexpr auto msb_extent = (msb + CHAR_BIT - 1) / CHAR_BIT;
218-
constexpr auto base_extent = Index * sizeof(std::uint32_t);
218+
constexpr auto base_extent = Index * sizeof(T);
219219
constexpr auto extent = base_extent + msb_extent;
220220
return (extent + sizeof(T) - 1) / sizeof(T);
221221
}

0 commit comments

Comments
 (0)