aboutsummaryrefslogtreecommitdiff
path: root/src/freedv_fsk.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/freedv_fsk.c')
-rw-r--r--src/freedv_fsk.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/freedv_fsk.c b/src/freedv_fsk.c
index 0613263..ea346c2 100644
--- a/src/freedv_fsk.c
+++ b/src/freedv_fsk.c
@@ -123,7 +123,7 @@ void freedv_800xa_open(struct freedv *f) {
f->bits_per_codec_frame = codec2_bits_per_frame(f->codec2);
f->bits_per_modem_frame = f->n_codec_frames * f->bits_per_codec_frame;
- int n_packed_bytes = (f->bits_per_modem_frame + 7) / 8;
+ int n_packed_bytes = (f->bits_per_modem_frame + 7.0) / 8.0 + 0.5;
f->tx_payload_bits = MALLOC(n_packed_bytes);
assert(f->tx_payload_bits != NULL);
f->rx_payload_bits = MALLOC(n_packed_bytes);