Commit 6d951bda authored by Rémi Denis-Courmont's avatar Rémi Denis-Courmont

msecstotimestr: fix negative numbers handling

parent 820b4643
...@@ -127,6 +127,13 @@ char *mstrtime( char *psz_buffer, mtime_t date ) ...@@ -127,6 +127,13 @@ char *mstrtime( char *psz_buffer, mtime_t date )
*/ */
char *secstotimestr( char *psz_buffer, int32_t i_seconds ) char *secstotimestr( char *psz_buffer, int32_t i_seconds )
{ {
if( unlikely(i_seconds < 0) )
{
secstotimestr( psz_buffer + 1, -i_seconds );
*psz_buffer = '-';
return psz_buffer;
}
div_t d; div_t d;
d = div( i_seconds, 60 ); d = div( i_seconds, 60 );
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment