X-Git-Url: http://git.tdb.fi/?p=ext%2Fsubsurface.git;a=blobdiff_plain;f=profile.c;h=0039867efc29355737294cb1ac02a0cb85743ce6;hp=d4e88c02c21c498293d87a87ebf0f7a853a13ea0;hb=HEAD;hpb=9d46581913ce33664e333a4d6eaf7f4e26e20b1c diff --git a/profile.c b/profile.c index d4e88c0..0039867 100644 --- a/profile.c +++ b/profile.c @@ -1387,6 +1387,8 @@ void plot(struct graphics_context *gc, cairo_rectangle_int_t *drawing_area, stru int duration = dive->duration.seconds; int maxdepth = dive->maxdepth.mm; int asc_desc_time = dive->maxdepth.mm*60/9000; + if (asc_desc_time * 2 >= duration) + asc_desc_time = duration / 2; sample = fake; fake[1].time.seconds = asc_desc_time; fake[1].depth.mm = maxdepth;