mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
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>
This commit is contained in:
parent
d9c77a27da
commit
a481cdc13d
2 changed files with 6 additions and 0 deletions
|
@ -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;
|
||||
|
||||
|
|
|
@ -256,6 +256,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;
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue