diff options
Diffstat (limited to 'apps/menus/time_menu.c')
-rw-r--r-- | apps/menus/time_menu.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/apps/menus/time_menu.c b/apps/menus/time_menu.c index cb31c33fc9..b1ea33f858 100644 --- a/apps/menus/time_menu.c +++ b/apps/menus/time_menu.c @@ -175,14 +175,14 @@ static void draw_timedate(struct viewport *vp, struct screen *display) if (valid_time(tm)) { - snprintf(time, 16, "%02d:%02d:%02d%s", + snprintf(time, sizeof(time), "%02d:%02d:%02d%s", global_settings.timeformat == 0 ? tm->tm_hour : ((tm->tm_hour + 11) % 12) + 1, tm->tm_min, tm->tm_sec, global_settings.timeformat == 0 ? "" : tm->tm_hour>11 ? " P" : " A"); - snprintf(date, 16, "%s %d %d", + snprintf(date, sizeof(date), "%s %d %d", str(LANG_MONTH_JANUARY + tm->tm_mon), tm->tm_mday, tm->tm_year+1900); @@ -193,8 +193,8 @@ static void draw_timedate(struct viewport *vp, struct screen *display) d = str(LANG_UNKNOWN); } - display->puts_scroll(0, line++, time); - display->puts_scroll(0, line, date); + display->puts_scroll(0, line++, t); + display->puts_scroll(0, line, d); display->update_viewport(); display->set_viewport(NULL); |