From 650f06aa1943d439ac049f6bc276b216999e6a56 Mon Sep 17 00:00:00 2001 From: guochuangjian <465469791@qq.com> Date: Wed, 1 Aug 2018 00:40:58 +0800 Subject: [PATCH] fix usRcvBufferPos == MB_SER_PDU_SIZE_MAX assert --- components/net/freemodbus/modbus/rtu/mbrtu.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/components/net/freemodbus/modbus/rtu/mbrtu.c b/components/net/freemodbus/modbus/rtu/mbrtu.c index c023c9265..ae5e0325c 100644 --- a/components/net/freemodbus/modbus/rtu/mbrtu.c +++ b/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 )