mirror of
https://github.com/RT-Thread/rt-thread.git
synced 2025-02-22 16:49:59 +08:00
fix usRcvBufferPos == MB_SER_PDU_SIZE_MAX assert
This commit is contained in:
parent
4b0839bd7b
commit
650f06aa19
@ -153,7 +153,7 @@ eMBRTUReceive( UCHAR * pucRcvAddress, UCHAR ** pucFrame, USHORT * pusLength )
|
|||||||
eMBErrorCode eStatus = MB_ENOERR;
|
eMBErrorCode eStatus = MB_ENOERR;
|
||||||
|
|
||||||
ENTER_CRITICAL_SECTION( );
|
ENTER_CRITICAL_SECTION( );
|
||||||
assert_param( usRcvBufferPos < MB_SER_PDU_SIZE_MAX );
|
assert_param( usRcvBufferPos <= MB_SER_PDU_SIZE_MAX );
|
||||||
|
|
||||||
/* Length and CRC check */
|
/* Length and CRC check */
|
||||||
if( ( usRcvBufferPos >= MB_SER_PDU_SIZE_MIN )
|
if( ( usRcvBufferPos >= MB_SER_PDU_SIZE_MIN )
|
||||||
|
Loading…
x
Reference in New Issue
Block a user