fix(p3io): Off-by-one error on assert

Buffers are allowed to have the exact size as the max defined
P3IO buffer size. Cutting it short by one byte causes this
to fail incorrectly when using the pure raw buffer structure
This commit is contained in:
icex2
2023-11-28 15:33:58 +01:00
parent 0fdde8b32d
commit f3c834ce20
+1 -1
View File
@@ -41,7 +41,7 @@ void p3io_resp_hdr_init(
{
log_assert(resp_hdr != NULL);
log_assert(req_hdr != NULL);
log_assert(nbytes < P3IO_MAX_MESSAGE_SIZE);
log_assert(nbytes <= P3IO_MAX_MESSAGE_SIZE);
/* Length byte in this packet format counts everything from the length
byte onwards. The length byte itself occurs at the start of the frame. */