From 055bd2ff00f48390014fb8c390ee7a67e8bf85f9 Mon Sep 17 00:00:00 2001 From: tekka007 Date: Thu, 31 Dec 2015 12:02:40 +0100 Subject: [PATCH] Clear last byte of data buffer --- libraries/MySensors/core/MyTransport.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libraries/MySensors/core/MyTransport.cpp b/libraries/MySensors/core/MyTransport.cpp index a9edb5f..fd823f1 100644 --- a/libraries/MySensors/core/MyTransport.cpp +++ b/libraries/MySensors/core/MyTransport.cpp @@ -141,7 +141,7 @@ inline void transportProcess() { // This message is addressed to this node mSetSigned(_msg,0); // Clear the sign-flag now as verification is completed // clear bytes after message end - memset((uint8_t*)&_msg.data[messageLength],0x00,MAX_PAYLOAD-messageLength); + memset((uint8_t*)&_msg.data[messageLength],0x00,MAX_PAYLOAD-messageLength+1); #if defined(MY_REPEATER_FEATURE) if (_msg.last != _nc.parentNodeId) {