From 672cacb5e5c81472c67268c44199c3e0d7df9a70 Mon Sep 17 00:00:00 2001 From: twinaphex Date: Sun, 21 Jun 2015 23:58:50 +0200 Subject: [PATCH] (Menu) Update labels --- menu/cbs/menu_cbs_get_value.c | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/menu/cbs/menu_cbs_get_value.c b/menu/cbs/menu_cbs_get_value.c index 7310b0e3cc..de532751db 100644 --- a/menu/cbs/menu_cbs_get_value.c +++ b/menu/cbs/menu_cbs_get_value.c @@ -216,10 +216,11 @@ static void menu_action_setting_disp_set_label_shader_default_filter( *s = '\0'; *w = 19; - snprintf(s, len, "%s", - settings->video.smooth ? - menu_hash_to_str(MENU_VALUE_LINEAR) : - menu_hash_to_str(MENU_VALUE_NEAREST)); + + if (settings->video.smooth) + strlcpy(s, menu_hash_to_str(MENU_VALUE_LINEAR), len); + else + strlcpy(s, menu_hash_to_str(MENU_VALUE_NEAREST), len); } static void menu_action_setting_disp_set_label_shader_parameter( @@ -371,11 +372,11 @@ static void menu_action_setting_disp_set_label_input_desc( [inp_desc_user][inp_desc_button_index_offset]; if (inp_desc_button_index_offset < RARCH_FIRST_CUSTOM_BIND) - snprintf(s, len, "%s", - settings->input.binds[inp_desc_user][remap_id].desc); + strlcpy(s, + settings->input.binds[inp_desc_user][remap_id].desc, + len); else - snprintf(s, len, "%s", - axis_labels[remap_id]); + strlcpy(s, axis_labels[remap_id], len); *w = 19; strlcpy(s2, path, len2); @@ -396,7 +397,8 @@ static void menu_action_setting_disp_set_label_cheat( if (cheat_index < global->cheat->buf_size) snprintf(s, len, "%s : (%s)", (global->cheat->cheats[cheat_index].code != NULL) - ? global->cheat->cheats[cheat_index].code : "N/A", + ? global->cheat->cheats[cheat_index].code : + menu_hash_to_str(MENU_VALUE_NOT_AVAILABLE), global->cheat->cheats[cheat_index].state ? menu_hash_to_str(MENU_VALUE_ON) : menu_hash_to_str(MENU_VALUE_OFF)