summaryrefslogtreecommitdiff
path: root/apps/gui/option_select.c
diff options
context:
space:
mode:
Diffstat (limited to 'apps/gui/option_select.c')
-rw-r--r--apps/gui/option_select.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/apps/gui/option_select.c b/apps/gui/option_select.c
index 7b6c489bf3..01259c4136 100644
--- a/apps/gui/option_select.c
+++ b/apps/gui/option_select.c
@@ -76,7 +76,7 @@ char *option_get_valuestring(const struct settings_list *setting,
76 if ((setting->flags & F_BOOL_SETTING) == F_BOOL_SETTING) 76 if ((setting->flags & F_BOOL_SETTING) == F_BOOL_SETTING)
77 { 77 {
78 bool val = (bool)temp_var; 78 bool val = (bool)temp_var;
79 strncpy(buffer, str(val? setting->bool_setting->lang_yes : 79 strlcpy(buffer, str(val? setting->bool_setting->lang_yes :
80 setting->bool_setting->lang_no), buf_len); 80 setting->bool_setting->lang_no), buf_len);
81 } 81 }
82#if 0 /* probably dont need this one */ 82#if 0 /* probably dont need this one */
@@ -137,7 +137,7 @@ char *option_get_valuestring(const struct settings_list *setting,
137 const struct choice_setting *info = setting->choice_setting; 137 const struct choice_setting *info = setting->choice_setting;
138 if (info->talks[(int)temp_var] < LANG_LAST_INDEX_IN_ARRAY) 138 if (info->talks[(int)temp_var] < LANG_LAST_INDEX_IN_ARRAY)
139 { 139 {
140 strncpy(buffer, str(info->talks[(int)temp_var]), buf_len); 140 strlcpy(buffer, str(info->talks[(int)temp_var]), buf_len);
141 } 141 }
142 else 142 else
143 { 143 {
@@ -149,7 +149,7 @@ char *option_get_valuestring(const struct settings_list *setting,
149 { 149 {
150 int value= (int)temp_var; 150 int value= (int)temp_var;
151 char *val = P2STR(setting->choice_setting->desc[value]); 151 char *val = P2STR(setting->choice_setting->desc[value]);
152 strncpy(buffer, val, buf_len); 152 strlcpy(buffer, val, buf_len);
153 } 153 }
154 } 154 }
155 return buffer; 155 return buffer;