diff options
Diffstat (limited to 'apps/menus')
-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) | |||
175 | 175 | ||
176 | if (valid_time(tm)) | 176 | if (valid_time(tm)) |
177 | { | 177 | { |
178 | snprintf(time, 16, "%02d:%02d:%02d%s", | 178 | snprintf(time, sizeof(time), "%02d:%02d:%02d%s", |
179 | global_settings.timeformat == 0 ? tm->tm_hour : | 179 | global_settings.timeformat == 0 ? tm->tm_hour : |
180 | ((tm->tm_hour + 11) % 12) + 1, | 180 | ((tm->tm_hour + 11) % 12) + 1, |
181 | tm->tm_min, | 181 | tm->tm_min, |
182 | tm->tm_sec, | 182 | tm->tm_sec, |
183 | global_settings.timeformat == 0 ? "" : | 183 | global_settings.timeformat == 0 ? "" : |
184 | tm->tm_hour>11 ? " P" : " A"); | 184 | tm->tm_hour>11 ? " P" : " A"); |
185 | snprintf(date, 16, "%s %d %d", | 185 | snprintf(date, sizeof(date), "%s %d %d", |
186 | str(LANG_MONTH_JANUARY + tm->tm_mon), | 186 | str(LANG_MONTH_JANUARY + tm->tm_mon), |
187 | tm->tm_mday, | 187 | tm->tm_mday, |
188 | tm->tm_year+1900); | 188 | tm->tm_year+1900); |
@@ -193,8 +193,8 @@ static void draw_timedate(struct viewport *vp, struct screen *display) | |||
193 | d = str(LANG_UNKNOWN); | 193 | d = str(LANG_UNKNOWN); |
194 | } | 194 | } |
195 | 195 | ||
196 | display->puts_scroll(0, line++, time); | 196 | display->puts_scroll(0, line++, t); |
197 | display->puts_scroll(0, line, date); | 197 | display->puts_scroll(0, line, d); |
198 | 198 | ||
199 | display->update_viewport(); | 199 | display->update_viewport(); |
200 | display->set_viewport(NULL); | 200 | display->set_viewport(NULL); |