From 5b5272e68418428ab05ef4804d39b71300b7d0a2 Mon Sep 17 00:00:00 2001 From: Andrea Pede Date: Thu, 9 May 2019 11:26:20 +0200 Subject: [PATCH 1/2] 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; From 09c1b4f5f9fce189bac1a470b2750480240d2039 Mon Sep 17 00:00:00 2001 From: Andrea Pede Date: Thu, 9 May 2019 12:14:18 +0200 Subject: [PATCH 2/2] Update _changelog.ino --- sonoff/_changelog.ino | 1 + 1 file changed, 1 insertion(+) diff --git a/sonoff/_changelog.ino b/sonoff/_changelog.ino index 9ddb1b357..871d04ae4 100644 --- a/sonoff/_changelog.ino +++ b/sonoff/_changelog.ino @@ -7,6 +7,7 @@ * Extend PWM resolution from 8 to 10 bits for low brightness lights * Allow all 5 PWM channels individually adressable with LEDs. (#5741) * Fixed inversion of WC/WW channels, back to RGBCW + * Fixed the Unescape() function and the SendSerial3 behaviour * * 6.5.0.8 20190413 * Add Tuya Dimmer 10 second heartbeat serial packet required by some Tuya dimmer secondary MCUs