Skip to content

Commit d819dbc

Browse files
committed
fix: Fixes #4 warning strncpy
1 parent 36dae48 commit d819dbc

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Modbus.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -694,7 +694,7 @@ void Modbus::reportServerId() {
694694
_frame[2] = 0x00; // Server ID
695695
_frame[3] = 0xFF; // Run Indicator Status
696696
if (_additional_data) { // Additional Data
697-
strncpy ( (char *) &_frame[4], _additional_data, strlen (_additional_data));
697+
strcpy ( (char *) &_frame[4], _additional_data);
698698
}
699699
_reply = MB_REPLY_NORMAL;
700700
}

0 commit comments

Comments
 (0)