diff options
author | Arno <arno@disconnect.de> | 2018-11-24 04:38:41 +0100 |
---|---|---|
committer | Arno <arno@disconnect.de> | 2018-11-24 04:38:41 +0100 |
commit | ccde859868e8f292b4df172050767ce4327bb3d3 (patch) | |
tree | 767e8f5693c8f64ec0889b7a81368b9709eb204a | |
parent | 6212e95af0b186b70b91fee733da00f088abb99a (diff) | |
download | SheMov-ccde859868e8f292b4df172050767ce4327bb3d3.tar.gz SheMov-ccde859868e8f292b4df172050767ce4327bb3d3.tar.bz2 SheMov-ccde859868e8f292b4df172050767ce4327bb3d3.zip |
Fix durationFromSecs
commit e5274f4c27f847bedaa910a84ed3468d1aba32e1 introduced a double
colon and removed leading zeros. Make snprintf pretty again.
-rw-r--r-- | helper.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -207,7 +207,7 @@ namespace Helper { seconds = secs - hours * 60 * 60 - minutes * 60; seconds = (seconds > 60) ? 59 : seconds; QByteArray retval(10, '\0'); - ::snprintf(retval.data(), 9, "%lld::%lld:%lld", hours, minutes, seconds); + ::snprintf(retval.data(), 9, "%.2lld:%.2lld:%.2lld", hours, minutes, seconds); return retval; } |