]> git.tdb.fi Git - ext/subsurface.git/commitdiff
plot the time with a fixed padding (leading zero)
authorMaximilian Güntner <maximilian.guentner@gmail.com>
Tue, 21 Aug 2012 23:23:54 +0000 (01:23 +0200)
committerMaximilian Güntner <maximilian.guentner@gmail.com>
Tue, 21 Aug 2012 23:23:54 +0000 (01:23 +0200)
Signed-off-by: Maximilian Güntner <maximilian.guentner@gmail.com>
profile.c

index 97ea9077d480f871436e89940838f962f72a1d3e..3ad11c0d0e97e4273f150ec5190a6ec42753105b 100644 (file)
--- a/profile.c
+++ b/profile.c
@@ -498,7 +498,7 @@ static void plot_depth_profile(struct graphics_context *gc, struct plot_info *pi
        if (maxtime < 600) {
                /* Be a bit more verbose with shorter dives */
                for (i = incr; i < maxtime; i += incr)
-                       plot_text(gc, &tro, i, 1, "%d:%d", i/60, i%60);
+                       plot_text(gc, &tro, i, 1, "%02d:%02d", i/60, i%60);
        } else {
                /* Only render the time on every second marker for normal dives */
                for (i = incr; i < maxtime; i += 2 * incr)