From 3446dd512597d538c1c1f337a85225700c965a25 Mon Sep 17 00:00:00 2001 From: Linus Torvalds Date: Mon, 12 Sep 2022 16:07:57 -0400 Subject: [PATCH] fix up sample sensor indexes before fixing up cylinder pressures The cylinder pressure fixup depends on the sample sensors indexes having been fixed. Signed-off-by: Linus Torvalds --- core/dive.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/core/dive.c b/core/dive.c index ffbd16673..f6ada7534 100644 --- a/core/dive.c +++ b/core/dive.c @@ -1240,12 +1240,12 @@ static void fixup_dive_dc(struct dive *dive, struct divecomputer *dc) /* Fix up gas switch events */ fixup_dc_gasswitch(dive, dc); - /* Fix up cylinder pressures based on DC info */ - fixup_dive_pressures(dive, dc); - /* Fix up cylinder ids in pressure sensors */ fixup_dc_sample_sensors(dc, dive->cylinders.nr); + /* Fix up cylinder pressures based on DC info */ + fixup_dive_pressures(dive, dc); + fixup_dc_events(dc); /* Fixup CCR / PSCR dives with o2sensor values, but without no_o2sensors */