From d6b045e3d423a3182e8d1b43937fb43251ff2fee Mon Sep 17 00:00:00 2001 From: Theo Arends <11044339+arendst@users.noreply.github.com> Date: Tue, 4 Oct 2022 18:11:36 +0200 Subject: [PATCH] Do not skip leading spaces on (s)serialsend Do not skip leading spaces on (s)serialsend (#16723) --- tasmota/tasmota_support/support_command.ino | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/tasmota/tasmota_support/support_command.ino b/tasmota/tasmota_support/support_command.ino index 193d78a01..8c1a1744e 100644 --- a/tasmota/tasmota_support/support_command.ino +++ b/tasmota/tasmota_support/support_command.ino @@ -411,9 +411,11 @@ void CommandHandler(char* topicBuf, char* dataBuf, uint32_t data_len) bool binary_data = (index > 199); // Suppose binary data on topic index > 199 if (!binary_data) { - while (*dataBuf && isspace(*dataBuf)) { - dataBuf++; // Skip leading spaces in data - data_len--; + if (strstr_P(type, PSTR("SERIALSEND")) == nullptr) { // Do not skip leading spaces on (s)serialsend + while (*dataBuf && isspace(*dataBuf)) { + dataBuf++; // Skip leading spaces in data + data_len--; + } } }