diff options
Diffstat (limited to 'core/dive.c')
-rw-r--r-- | core/dive.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/core/dive.c b/core/dive.c index 0b68819fa..24fa8780d 100644 --- a/core/dive.c +++ b/core/dive.c @@ -2126,9 +2126,7 @@ static int match_cylinder(const cylinder_t *cyl, const struct dive *dive, const */ static void merge_one_cylinder(struct cylinder_table *t, const cylinder_t *a, const cylinder_t *b) { - cylinder_t *res; - add_empty_cylinder(t); - res = t->cylinders + (t->nr - 1); + cylinder_t *res = add_empty_cylinder(t); res->type.size.mliter = a->type.size.mliter ? a->type.size.mliter : b->type.size.mliter; res->type.workingpressure.mbar = a->type.workingpressure.mbar ? |