Browse Source

fix usRcvBufferPos == MB_SER_PDU_SIZE_MAX assert

guochuangjian 7 years ago
parent
commit
650f06aa19
1 changed files with 1 additions and 1 deletions
  1. 1 1
      components/net/freemodbus/modbus/rtu/mbrtu.c

+ 1 - 1
components/net/freemodbus/modbus/rtu/mbrtu.c

@@ -153,7 +153,7 @@ eMBRTUReceive( UCHAR * pucRcvAddress, UCHAR ** pucFrame, USHORT * pusLength )
     eMBErrorCode    eStatus = MB_ENOERR;
 
     ENTER_CRITICAL_SECTION(  );
-    assert_param( usRcvBufferPos < MB_SER_PDU_SIZE_MAX );
+    assert_param( usRcvBufferPos <= MB_SER_PDU_SIZE_MAX );
 
     /* Length and CRC check */
     if( ( usRcvBufferPos >= MB_SER_PDU_SIZE_MIN )