This commit is contained in:
Cuddly Cheetah 2019-10-14 17:22:06 +02:00 committed by GitHub
parent d7792ca004
commit 4327ad325a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 8 additions and 5 deletions

View File

@ -687,15 +687,18 @@ int main(int argc, char *argv[]) {
: textMessageLength(x, address, strlen(message));
uint32_t *transmission =
(uint32_t *)malloc(sizeof(uint32_t) * messageLength + 0);
(uint32_t *)malloc(sizeof(uint32_t) * messageLength + 2);
encodeTransmission(x, address, SetFunctionBits, message, transmission);
completeLength += messageLength + 0;
*transmission = 0xAAAAAAAA;
transmission++;
*transmission = 0xAAAAAAAA;
transmission++;
completeLength += messageLength + 2;
completeTransmission = (uint32_t *)realloc(completeTransmission, sizeof(uint32_t) * completeLength);
for (size_t byteI = 0; byteI < messageLength + 0; byteI++)
for (size_t byteI = 0; byteI < messageLength + 2; byteI++)
{
completeTransmission[(completeLength - (messageLength + 0)) + byteI] = transmission[byteI];
completeTransmission[(completeLength - (messageLength + 2)) + byteI] = transmission[byteI];
}
}
}