X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=src%2Fmisc%2Fmtime.c;h=e6f9da637a47e2ca03954a633723f12ab0c38ebd;hb=820b4643f98b98aaaa3289c7f8f34bad7dc02e13;hp=8905be468edd5ec3c10173616925340acee0ad28;hpb=e8f2c68830e2bdd09517cad836d9a1d35bcc1881;p=vlc diff --git a/src/misc/mtime.c b/src/misc/mtime.c index 8905be468e..e6f9da637a 100644 --- a/src/misc/mtime.c +++ b/src/misc/mtime.c @@ -125,7 +125,7 @@ char *mstrtime( char *psz_buffer, mtime_t date ) * \param psz_buffer should be a buffer at least MSTRTIME_MAX_SIZE characters * \return psz_buffer is returned so this can be used as printf parameter. */ -char *secstotimestr( char *psz_buffer, int i_seconds ) +char *secstotimestr( char *psz_buffer, int32_t i_seconds ) { div_t d; @@ -134,11 +134,11 @@ char *secstotimestr( char *psz_buffer, int i_seconds ) d = div( d.quot, 60 ); if( d.quot ) - snprintf( psz_buffer, MSTRTIME_MAX_SIZE, "%d:%2.2d:%2.2d", + snprintf( psz_buffer, MSTRTIME_MAX_SIZE, "%u:%02u:%02u", d.quot, d.rem, i_seconds ); else - snprintf( psz_buffer, MSTRTIME_MAX_SIZE, "%2.2d:%2.2d", - d.quot, i_seconds ); + snprintf( psz_buffer, MSTRTIME_MAX_SIZE, "%02u:%02u", + d.rem, i_seconds ); return psz_buffer; }