summaryrefslogtreecommitdiffstats
path: root/apps/menus/settings_menu.c
diff options
context:
space:
mode:
Diffstat (limited to 'apps/menus/settings_menu.c')
-rw-r--r--apps/menus/settings_menu.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/apps/menus/settings_menu.c b/apps/menus/settings_menu.c
index ca0ec91967..67595498ad 100644
--- a/apps/menus/settings_menu.c
+++ b/apps/menus/settings_menu.c
@@ -500,14 +500,15 @@ static int seconds_to_min(int secs)
/* A string representation of either whether a sleep timer will be started or
canceled, and how long it will be or how long is remaining in brackets */
-static char* sleep_timer_getname(int selected_item, void * data, char *buffer)
+static char* sleep_timer_getname(int selected_item, void * data,
+ char *buffer, size_t buffer_len)
{
(void)selected_item;
(void)data;
int sec = get_sleep_timer();
char timer_buf[10];
- /* we have no sprintf, so MAX_PATH is a guess */
- snprintf(buffer, MAX_PATH, "%s (%s)",
+
+ snprintf(buffer, buffer_len, "%s (%s)",
str(sec ? LANG_SLEEP_TIMER_CANCEL_CURRENT
: LANG_SLEEP_TIMER_START_CURRENT),
sleep_timer_formatter(timer_buf, sizeof(timer_buf),