We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 3e10ca3 commit 540d99bCopy full SHA for 540d99b
libraries/Modbus/Modbus.cpp
@@ -1,6 +1,6 @@
1
/*
2
Modbus.cpp - Source for Modbus Base Library
3
- Copyright (C) 2014 André Sarmento Barbosa
+ Copyright (C) 2014 André Sarmento Barbosa
4
*/
5
#include "Modbus.h"
6
@@ -204,7 +204,7 @@ void Modbus::reportServerId() {
204
_frame[2] = 0x00; // Server ID
205
_frame[3] = 0xFF; // Run Indicator Status
206
if (_additional_data) { // Additional Data
207
- strncpy(&_frame[4], _additional_data, strlen(_additional_data));
+ strncpy((char *) &_frame[4], _additional_data, strlen(_additional_data));
208
}
209
_reply = MB_REPLY_NORMAL;
210
0 commit comments