diff options
Diffstat (limited to 'apps/wps-display.c')
-rw-r--r-- | apps/wps-display.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/apps/wps-display.c b/apps/wps-display.c index 457282c350..9f136ffa0c 100644 --- a/apps/wps-display.c +++ b/apps/wps-display.c | |||
@@ -237,7 +237,13 @@ bool wps_load(char* file, bool display) | |||
237 | */ | 237 | */ |
238 | static void format_time(char* buf, int buf_size, int time) | 238 | static void format_time(char* buf, int buf_size, int time) |
239 | { | 239 | { |
240 | snprintf(buf, buf_size, "%d:%02d", time / 60000, time % 60000 / 1000); | 240 | if ( time < 3600000 ) { |
241 | snprintf(buf, buf_size, "%d:%02d", | ||
242 | time % 3600000 / 60000, time % 60000 / 1000); | ||
243 | } else { | ||
244 | snprintf(buf, buf_size, "%d:%02d:%02d", | ||
245 | time / 3600000, time % 3600000 / 60000, time % 60000 / 1000); | ||
246 | } | ||
241 | } | 247 | } |
242 | 248 | ||
243 | /* Extract a part from a path. | 249 | /* Extract a part from a path. |