From 1463b11bad75299b1d4668239d460975a89b8dd2 Mon Sep 17 00:00:00 2001 From: Xavier Arteaga Date: Fri, 12 Mar 2021 10:33:43 +0100 Subject: [PATCH] Fix compilation --- lib/src/radio/radio.cc | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/lib/src/radio/radio.cc b/lib/src/radio/radio.cc index 00685638a..bc58d699d 100644 --- a/lib/src/radio/radio.cc +++ b/lib/src/radio/radio.cc @@ -416,10 +416,13 @@ bool radio::tx(rf_buffer_interface& buffer, const rf_timestamp_interface& tx_tim if (ratio > 1 && nof_samples * ratio > tx_buffer[0].size()) { // This is a corner case that could happen during sample rate change transitions, as it does not have a negative // impact, log it as info. - logger.info(fmt::format("Tx number of samples ({}/{}) exceeds buffer size ({})\n", - buffer.get_nof_samples(), - buffer.get_nof_samples() * ratio, - tx_buffer[0].size())); + fmt::memory_buffer buff; + fmt::format_to(buff, + "Tx number of samples ({}/{}) exceeds buffer size ({})\n", + buffer.get_nof_samples(), + buffer.get_nof_samples() * ratio, + tx_buffer[0].size()); + logger.info("%s", to_c_str(buff)); // Limit number of samples to transmit nof_samples = tx_buffer[0].size() / ratio;