Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
Michael Curry authored and Michael Curry committed Mar 13, 2023
1 parent f167010 commit 924db33
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion modbus/functions/mbfuncholding.c
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,7 @@ eMBFuncReadHoldingRegister( UCHAR * pucFrame, USHORT * usLen )
usRegAddress++;

usRegCount = ( USHORT )( pucFrame[MB_PDU_FUNC_READ_REGCNT_OFF] << 8 );
usRegCount = ( USHORT )( pucFrame[MB_PDU_FUNC_READ_REGCNT_OFF + 1] );
usRegCount |= ( USHORT )( pucFrame[MB_PDU_FUNC_READ_REGCNT_OFF + 1] );

/* Check if the number of registers to read is valid. If not
* return Modbus illegal data value exception.
Expand Down

0 comments on commit 924db33

Please sign in to comment.