Fix fwrite call to use sizeof(char) for byte count

pacsat-v2.2-tlm2
Alan Johnston 4 weeks ago committed by GitHub
parent a9c574d4ed
commit feab25f51c
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -1568,7 +1568,7 @@ void get_tlm_fox() {
{
FILE *telem_binary = fopen("/home/pi/CubeSatSim/tlm.bin", "wb");
if (telem_binary != NULL) {
int bytes_written = fwrite(b, 78, 1, telem_binary);
int bytes_written = fwrite(b, sizeof(char), 78, telem_binary);
printf("Writing %d bytes to tlm.bin\n", bytes_written);
fclose(telem_binary);
}

Loading…
Cancel
Save

Powered by TurnKey Linux.