From ec29c21a843c2e3990137ebd3aaed7314064d0fa Mon Sep 17 00:00:00 2001 From: Matthew Kennedy Date: Tue, 24 Sep 2024 18:36:05 -0700 Subject: [PATCH] safer comparison of CAN frame size --- firmware/can_helper.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/firmware/can_helper.h b/firmware/can_helper.h index 5ca38872..b80c9177 100644 --- a/firmware/can_helper.h +++ b/firmware/can_helper.h @@ -43,7 +43,7 @@ class CanTxMessage template class CanTxTyped final : public CanTxMessage { - static_assert(sizeof(TData) == sizeof(CANTxFrame::data8)); + static_assert(sizeof(TData) <= sizeof(CANTxFrame::data8)); public: explicit CanTxTyped(uint32_t eid) : CanTxMessage(eid) { }