[PATCH 1/2] Profile.c: Fix stepping through loop between sample points

Dirk Hohndel dirk at hohndel.org
Sun Aug 30 09:16:12 PDT 2015


Could I get a more detailed commit message for this?

/D

On Sun, Aug 30, 2015 at 11:00:25PM +1000, Rick Walsh wrote:
> Signed-off-by: Rick Walsh <rickmwalsh at gmail.com>
> ---
>  profile.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/profile.c b/profile.c
> index 0722151..79effeb 100644
> --- a/profile.c
> +++ b/profile.c
> @@ -857,8 +857,8 @@ void calculate_deco_information(struct dive *dive, struct divecomputer *dc, stru
>  			double min_pressure = add_segment(depth_to_mbar(depth, dive) / 1000.0,
>  							  &dive->cylinder[entry->cylinderindex].gasmix, time_stepsize, entry->o2pressure.mbar, dive, entry->sac);
>  			tissue_tolerance = min_pressure;
> -			if (j - t0 < time_stepsize)
> -				time_stepsize = j - t0;
> +			if ((t1 - j < time_stepsize) && (j < t1))
> +				time_stepsize = t1 - j;
>  		}
>  		if (t0 == t1)
>  			entry->ceiling = (entry - 1)->ceiling;
> -- 
> 2.4.3
> 
> _______________________________________________
> subsurface mailing list
> subsurface at subsurface-divelog.org
> http://lists.subsurface-divelog.org/cgi-bin/mailman/listinfo/subsurface


More information about the subsurface mailing list