UI: small refactoring, replace snprintf without placeholders with strcpy

replace/6c26e4d0d3a530b347b7617b933c0617fc07a767
Federico Amedeo Izzo 2021-01-01 20:30:21 +01:00
rodzic 2cd9a989fe
commit dba2b27310
1 zmienionych plików z 2 dodań i 2 usunięć

Wyświetl plik

@ -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);