mirror of https://github.com/arendst/Tasmota.git
Merge pull request #4072 from andrethomas/patch-1
Fix SerialSendRaw() to adjust for whitespace
This commit is contained in:
commit
f5eb2919bd
|
@ -755,6 +755,8 @@ void SerialSendRaw(char *codes, int size)
|
||||||
char *p;
|
char *p;
|
||||||
char stemp[3];
|
char stemp[3];
|
||||||
uint8_t code;
|
uint8_t code;
|
||||||
|
|
||||||
|
size = strlen(codes); // Force size to be strlen of codes, if whitespace was removed it will overrun into unwanted buffer space
|
||||||
|
|
||||||
while (size > 0) {
|
while (size > 0) {
|
||||||
snprintf(stemp, sizeof(stemp), codes);
|
snprintf(stemp, sizeof(stemp), codes);
|
||||||
|
|
Loading…
Reference in New Issue