From 5b5272e68418428ab05ef4804d39b71300b7d0a2 Mon Sep 17 00:00:00 2001 From: Andrea Pede Date: Thu, 9 May 2019 11:26:20 +0200 Subject: [PATCH] Missing the end pointer reference solves #5760 Exiting from the unescape call the content in buffer still contains the original string. The result of unescape elaboration works well, but the rest of the string is still there and in the printf in the main program infact is printed overlapped to the previous content. TY MauroS for the hint. --- sonoff/support.ino | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sonoff/support.ino b/sonoff/support.ino index d8732fc85..95d3326ce 100644 --- a/sonoff/support.ino +++ b/sonoff/support.ino @@ -353,7 +353,7 @@ char* Unescape(char* buffer, uint16_t* size) } } *size = end_size; - + *write++ = 0; // add the end string pointer reference // AddLogBuffer(LOG_LEVEL_DEBUG, (uint8_t*)buffer, *size); return buffer;