diff options
author | Jan Mulder <jlmulder@xs4all.nl> | 2017-04-24 16:28:06 +0200 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2017-04-24 07:51:12 -0700 |
commit | 9b5d3b60abca206bcbee1def5be04b22f2f89523 (patch) | |
tree | 6ffbbc002d2381c4433d5c8de7657f1b48671a88 /core | |
parent | 51ee9d4405d5033b6e2d9551dec0805fc55e3718 (diff) | |
download | subsurface-9b5d3b60abca206bcbee1def5be04b22f2f89523.tar.gz |
Do not carry po2 setpoint data over dive boundaries
The file static po2 value, used to set the setpoint data, was not re-initialized
at the parsing of a dive during import from the divecomputer. So, in one import session,
the po2 was transferred from one dive to the next, obviously resulting in weird bugs, due
to possible wrong po2 settings.
Signed-off-by: Jan Mulder <jlmulder@xs4all.nl>
Diffstat (limited to 'core')
-rw-r--r-- | core/libdivecomputer.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/core/libdivecomputer.c b/core/libdivecomputer.c index 1455e3503..cd52866fa 100644 --- a/core/libdivecomputer.c +++ b/core/libdivecomputer.c @@ -749,8 +749,8 @@ static int dive_cb(const unsigned char *data, unsigned int size, device_data_t *devdata = userdata; struct dive *dive = NULL; - /* reset the deco / ndl data */ - ndl = stoptime = stopdepth = 0; + /* reset static data, that is only valid per dive */ + ndl = stoptime = stopdepth = po2 = 0; in_deco = false; current_gas_index = -1; |