Fix: set assert lower limit equal to zero.
authorGuilherme Maciel Ferreira <guilherme.maciel.ferreira@gmail.com>
Thu, 5 Jan 2012 22:27:17 +0000 (20:27 -0200)
committerGuilherme Maciel Ferreira <guilherme.maciel.ferreira@gmail.com>
Thu, 5 Jan 2012 22:27:17 +0000 (20:27 -0200)
src/host/messagepayload.cpp

index 2e35adb..737624f 100644 (file)
@@ -284,8 +284,8 @@ void MessagePayload::encode32(
         const uint32_t value
 )
 {
-    BOOST_ASSERT( ( 0 < first_byte ) && ( first_byte < static_cast<int>(PayloadSizeInBytes) ) );
-    BOOST_ASSERT( ( 0 < last_byte ) && ( last_byte < static_cast<int>(PayloadSizeInBytes) ) );
+    BOOST_ASSERT( ( 0 <= first_byte ) && ( first_byte < static_cast<int>(PayloadSizeInBytes) ) );
+    BOOST_ASSERT( ( 0 <= last_byte ) && ( last_byte < static_cast<int>(PayloadSizeInBytes) ) );
     BOOST_ASSERT( first_byte < last_byte );
     BOOST_ASSERT( ( ( last_byte - first_byte ) + 1 ) == sizeof(uint32_t) );