aboutsummaryrefslogtreecommitdiffstats
path: root/core/save-git.c
diff options
context:
space:
mode:
authorGravatar Berthold Stoeger <bstoeger@mail.tuwien.ac.at>2021-09-13 20:57:56 +0200
committerGravatar Dirk Hohndel <dirk@hohndel.org>2021-09-22 09:11:00 -0700
commita481cdc13d7bde8b12ef26b01b8c6722373ce0da (patch)
treee923aadfa570b0ff021552db0905edcfef5bbfb1 /core/save-git.c
parentd9c77a27da83d7f00254edd405406326254faae2 (diff)
downloadsubsurface-a481cdc13d7bde8b12ef26b01b8c6722373ce0da.tar.gz
core: don't write pressure samples with "no sensor"
This has led to broken XML files, don't do it. Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
Diffstat (limited to 'core/save-git.c')
-rw-r--r--core/save-git.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/core/save-git.c b/core/save-git.c
index 6bd237a8b..fc6567950 100644
--- a/core/save-git.c
+++ b/core/save-git.c
@@ -258,6 +258,9 @@ static void save_sample(struct membuffer *b, struct sample *sample, struct sampl
pressure_t p = sample->pressure[idx];
int sensor = sample->sensor[idx];
+ if (sensor == NO_SENSOR)
+ continue;
+
if (!p.mbar)
continue;