From dba2b27310a4aec3ac50048470a3120376220141 Mon Sep 17 00:00:00 2001 From: Federico Amedeo Izzo Date: Fri, 1 Jan 2021 20:30:21 +0100 Subject: [PATCH] UI: small refactoring, replace snprintf without placeholders with strcpy --- openrtx/src/ui.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/openrtx/src/ui.c b/openrtx/src/ui.c index 9196323f..d5e1beeb 100644 --- a/openrtx/src/ui.c +++ b/openrtx/src/ui.c @@ -376,7 +376,7 @@ void _ui_drawVFOMiddleInput(state_t* last_state) { // Replace Rx frequency with underscorses if(input_position == 1) - snprintf(new_rx_freq_buf, sizeof(new_rx_freq_buf), ">Rx:___._____"); + strcpy(new_rx_freq_buf, ">Rx:___._____"); new_rx_freq_buf[insert_pos] = input_char; gfx_print(freq1_pos, new_rx_freq_buf, layout.line1_font, TEXT_ALIGN_CENTER, color_white); @@ -406,7 +406,7 @@ void _ui_drawVFOMiddleInput(state_t* last_state) else { if(input_position == 1) - snprintf(new_tx_freq_buf, sizeof(new_tx_freq_buf), ">Tx:___._____"); + strcpy(new_tx_freq_buf, ">Tx:___._____"); new_tx_freq_buf[insert_pos] = input_char; gfx_print(freq2_pos, new_tx_freq_buf, layout.line1_font, TEXT_ALIGN_CENTER, color_white);