diff options
author | Dirk Hohndel <dirk@hohndel.org> | 2013-02-26 11:15:06 -0800 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2013-02-26 11:16:41 -0800 |
commit | 5cea16ec509bdca4d9410aea193277fa42fba1a4 (patch) | |
tree | 9501138d23ebe250b6e6b61acad2c61ab3f74600 /dive.c | |
parent | 42fa5a6368a3cc25b804b7dff769b806e86113ac (diff) | |
download | subsurface-5cea16ec509bdca4d9410aea193277fa42fba1a4.tar.gz |
Another update to DivingLog import
This fixes two bugs:
- we overwrote the max depth that we read from an XML file with 0 if there
are no samples
- we didn't parse the DepthAvg tag in the DivingLog XML
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'dive.c')
-rw-r--r-- | dive.c | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -617,7 +617,8 @@ static void fixup_dive_dc(struct dive *dive, struct divecomputer *dc) double depthtime = 0; int lasttime = 0; int lastindex = -1; - int maxdepth = 0, mintemp = 0; + int maxdepth = dc->maxdepth.mm; + int mintemp = 0; int lastdepth = 0; int lasttemp = 0, lastpressure = 0; int pressure_delta[MAX_CYLINDERS] = {INT_MAX, }; |