diff --git a/src/lib_ccx/ccx_encoders_scc.c b/src/lib_ccx/ccx_encoders_scc.c index a3228fc1..bc58a4e7 100644 --- a/src/lib_ccx/ccx_encoders_scc.c +++ b/src/lib_ccx/ccx_encoders_scc.c @@ -1139,7 +1139,7 @@ void write_character(const int fd, const unsigned char character, const bool dis } else { - if (*bytes_written % 2 == 1) + if (*bytes_written % 2 == 0) write(fd, " ", 1); fdprintf(fd, "%02x", odd_parity(character)); @@ -1165,7 +1165,7 @@ void write_control_code(const int fd, const unsigned char channel, const enum co } else { - if (*bytes_written) + if (*bytes_written % 2 == 0) write(fd, " ", 1); fdprintf(fd, "%02x%02x", odd_parity(get_first_byte(channel, code)), odd_parity(get_second_byte(code)));