Add NULL termination to payloads
Messages addressed to "this" node, will have a null char appended to the payload after message verification is done, because some "getters" assume the message being a string.
This commit is contained in:
@@ -620,6 +620,7 @@ boolean MySensor::process() {
|
||||
if (destination == nc.nodeId) {
|
||||
// This message is addressed to this node
|
||||
mSetSigned(msg,0);
|
||||
msg.data[mGetLength(msg)] = '\0'; // Add NULL termination so that "getters" works as expected
|
||||
|
||||
if (repeaterMode && last != nc.parentNodeId) {
|
||||
// Message is from one of the child nodes. Add it to routing table.
|
||||
|
||||
@@ -6,6 +6,6 @@
|
||||
#ifndef Version_h
|
||||
#define Version_h
|
||||
|
||||
#define LIBRARY_VERSION "1.5.3"
|
||||
#define LIBRARY_VERSION "1.5.4"
|
||||
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user