mirror of https://github.com/arendst/Tasmota.git
Do not skip leading spaces on (s)serialsend
Do not skip leading spaces on (s)serialsend (#16723)
This commit is contained in:
parent
6bd7be44ef
commit
d6b045e3d4
|
@ -411,11 +411,13 @@ void CommandHandler(char* topicBuf, char* dataBuf, uint32_t data_len)
|
||||||
|
|
||||||
bool binary_data = (index > 199); // Suppose binary data on topic index > 199
|
bool binary_data = (index > 199); // Suppose binary data on topic index > 199
|
||||||
if (!binary_data) {
|
if (!binary_data) {
|
||||||
|
if (strstr_P(type, PSTR("SERIALSEND")) == nullptr) { // Do not skip leading spaces on (s)serialsend
|
||||||
while (*dataBuf && isspace(*dataBuf)) {
|
while (*dataBuf && isspace(*dataBuf)) {
|
||||||
dataBuf++; // Skip leading spaces in data
|
dataBuf++; // Skip leading spaces in data
|
||||||
data_len--;
|
data_len--;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
int32_t payload = -99;
|
int32_t payload = -99;
|
||||||
if (!binary_data) {
|
if (!binary_data) {
|
||||||
|
|
Loading…
Reference in New Issue