Don't crash when we see too many O2 sensors

I can think of very, very, VERY few circumstances where it makes sense to crash
an end user application. This isn't one of them.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
Dirk Hohndel 2024-01-15 17:37:52 -08:00
parent 6c8afabedf
commit 789f55f53d

View file

@ -6,7 +6,6 @@
#include "gettext.h"
#include <limits.h>
#include <string.h>
#include <assert.h>
#include <stdlib.h>
#include "dive.h"
@ -1156,7 +1155,8 @@ static int calculate_ccr_po2(struct plot_data *entry, const struct divecomputer
return sump / 3;
}
default: // This should not happen
assert(np <= 3);
// assert(np <= 3);
printf("calculate_ccr_po2: np > 3 -- that's a problem, but maybe not enough to crash the app\n");
return 0;
}
}