Fix SerialSendRaw() to adjust for whitespace

Fix SerialSendRaw() to adjust for whitespace removal
This commit is contained in:
andrethomas 2018-10-15 22:30:26 +02:00 committed by GitHub
parent fb6cc194a9
commit 8345f3f872
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 0 deletions

View File

@ -755,6 +755,8 @@ void SerialSendRaw(char *codes, int size)
char *p;
char stemp[3];
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) {
snprintf(stemp, sizeof(stemp), codes);