mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
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:
parent
6c8afabedf
commit
789f55f53d
1 changed files with 2 additions and 2 deletions
|
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue