mirror of
https://github.com/espressif/esp-modbus.git
synced 2025-06-25 01:01:33 +02:00
fix crash if incorrect state on collisions v1
This commit is contained in:
@ -245,7 +245,9 @@ xMBRTUReceiveFSM( void )
|
||||
BOOL xStatus = FALSE;
|
||||
UCHAR ucByte;
|
||||
|
||||
assert( eSndState == STATE_TX_IDLE );
|
||||
if ( eSndState != STATE_TX_IDLE ) {
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
/* Always read the character. */
|
||||
xStatus = xMBPortSerialGetByte( ( CHAR * ) & ucByte );
|
||||
@ -307,7 +309,9 @@ xMBRTUTransmitFSM( void )
|
||||
{
|
||||
BOOL xNeedPoll = TRUE;
|
||||
|
||||
assert( eRcvState == STATE_RX_IDLE );
|
||||
if ( eRcvState != STATE_RX_IDLE ) {
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
switch ( eSndState )
|
||||
{
|
||||
|
@ -1,4 +1,4 @@
|
||||
version: "1.0.17"
|
||||
version: "1.0.18"
|
||||
description: ESP-MODBUS is the official Modbus library for Espressif SoCs.
|
||||
url: https://github.com/espressif/esp-modbus
|
||||
dependencies:
|
||||
|
Reference in New Issue
Block a user