From b949bad026c8bab7611998fb0fcf9f6008dbd7e9 Mon Sep 17 00:00:00 2001 From: Berthold Stoeger Date: Tue, 28 Apr 2020 14:50:40 +0200 Subject: core: always keep an empty cylinder at the end of the cylinder array This will be temporarilly used by the planner to mark consumption of air at the surface. Do this by creating a new function add_cylinder, which replaces add_to_cylinder_table() and takes care of always adding a dummy cylinder at the end of the table. Make the original add_to_cylinder_table() local, so that it cannot be accessed anymore. Signed-off-by: Berthold Stoeger --- core/liquivision.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'core/liquivision.c') diff --git a/core/liquivision.c b/core/liquivision.c index 905091dd8..5a9caf603 100644 --- a/core/liquivision.c +++ b/core/liquivision.c @@ -151,7 +151,7 @@ static void parse_dives(int log_version, const unsigned char *buf, unsigned int for (i = 0; i < 1; i++) { cylinder_t cyl = empty_cylinder; fill_default_cylinder(dive, &cyl); - add_to_cylinder_table(&dive->cylinders, i, cyl); + add_cylinder(&dive->cylinders, i, cyl); } // Model 0=Xen, 1,2=Xeo, 4=Lynx, other=Liquivision -- cgit v1.2.3-70-g09d2