summaryrefslogtreecommitdiffstats
path: root/core/profile.c
diff options
context:
space:
mode:
Diffstat (limited to 'core/profile.c')
-rw-r--r--core/profile.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/core/profile.c b/core/profile.c
index 7b5827416..eccbb5612 100644
--- a/core/profile.c
+++ b/core/profile.c
@@ -816,13 +816,15 @@ static void add_plot_pressure(struct plot_info *pi, int time, int cyl, int mbar)
static void setup_gas_sensor_pressure(struct dive *dive, struct divecomputer *dc, struct plot_info *pi)
{
- int prev = -1, i;
+ int prev, i;
struct event *ev;
unsigned int seen[MAX_CYLINDERS] = { 0, };
unsigned int first[MAX_CYLINDERS] = { 0, };
unsigned int last[MAX_CYLINDERS] = { 0, };
struct divecomputer *secondary;
+ prev = explicit_first_cylinder(dive, dc);
+ seen[prev] = 1;
for (i = 0; i < MAX_CYLINDERS; i++)
last[i] = INT_MAX;