Skip to content

Commit

Permalink
1、【修复】FreeModbus V1.5从机源码中遗留的读保持寄存器一处书写错误。
Browse files Browse the repository at this point in the history
Signed-off-by: armink <[email protected]>
  • Loading branch information
armink committed Nov 9, 2015
1 parent 211d19b commit b473707
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion FreeModbus/modbus/functions/mbfuncholding.c
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,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 b473707

Please sign in to comment.