From 789f55f53da52c338086880aaac28b5cab35700e Mon Sep 17 00:00:00 2001 From: Dirk Hohndel Date: Mon, 15 Jan 2024 17:37:52 -0800 Subject: [PATCH] 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 --- core/profile.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/core/profile.c b/core/profile.c index 5129673bf..f88ccc780 100644 --- a/core/profile.c +++ b/core/profile.c @@ -6,7 +6,6 @@ #include "gettext.h" #include #include -#include #include #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; } }