mirror of
https://github.com/espressif/esp-modbus.git
synced 2025-07-30 18:37:16 +02:00
Merge branch 'feature/fix_input_reg_max_reg_count' into 'master'
modbus fix read input regs max number Closes IDFGH-13284 See merge request idf/esp-modbus!74
This commit is contained in:
@ -87,7 +87,7 @@ eMBFuncReadInputRegister( UCHAR * pucFrame, USHORT * usLen )
|
|||||||
* return Modbus illegal data value exception.
|
* return Modbus illegal data value exception.
|
||||||
*/
|
*/
|
||||||
if( ( usRegCount >= 1 )
|
if( ( usRegCount >= 1 )
|
||||||
&& ( usRegCount < MB_PDU_FUNC_READ_REGCNT_MAX ) )
|
&& ( usRegCount <= MB_PDU_FUNC_READ_REGCNT_MAX ) )
|
||||||
{
|
{
|
||||||
/* Set the current PDU data pointer to the beginning. */
|
/* Set the current PDU data pointer to the beginning. */
|
||||||
pucFrameCur = &pucFrame[MB_PDU_FUNC_OFF];
|
pucFrameCur = &pucFrame[MB_PDU_FUNC_OFF];
|
||||||
|
Reference in New Issue
Block a user