From cfd5e0e8025095b55880482621836669d627a162 Mon Sep 17 00:00:00 2001 From: Guilherme Maciel Ferreira Date: Thu, 5 Jan 2012 20:27:17 -0200 Subject: [PATCH] Fix: set assert lower limit equal to zero. --- src/host/messagepayload.cpp | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/host/messagepayload.cpp b/src/host/messagepayload.cpp index 2e35adb..737624f 100644 --- a/src/host/messagepayload.cpp +++ b/src/host/messagepayload.cpp @@ -284,8 +284,8 @@ void MessagePayload::encode32( const uint32_t value ) { - BOOST_ASSERT( ( 0 < first_byte ) && ( first_byte < static_cast(PayloadSizeInBytes) ) ); - BOOST_ASSERT( ( 0 < last_byte ) && ( last_byte < static_cast(PayloadSizeInBytes) ) ); + BOOST_ASSERT( ( 0 <= first_byte ) && ( first_byte < static_cast(PayloadSizeInBytes) ) ); + BOOST_ASSERT( ( 0 <= last_byte ) && ( last_byte < static_cast(PayloadSizeInBytes) ) ); BOOST_ASSERT( first_byte < last_byte ); BOOST_ASSERT( ( ( last_byte - first_byte ) + 1 ) == sizeof(uint32_t) ); -- 1.7.1