aboutsummaryrefslogtreecommitdiffstats
path: root/xslt
diff options
context:
space:
mode:
authorGravatar Miika Turkia <miika.turkia@gmail.com>2014-04-08 23:08:58 +0300
committerGravatar Dirk Hohndel <dirk@hohndel.org>2014-04-10 09:11:00 -0700
commit07fabc03fd8f67e7fab8bb150c9b2406fc67e641 (patch)
tree93610a44b64844df3cb2e3f3dfd6eab88170fa8e /xslt
parent27fa775c7ceacfce82cce3722907b4c002505ea1 (diff)
downloadsubsurface-07fabc03fd8f67e7fab8bb150c9b2406fc67e641.tar.gz
No negative depth on divelogs.de export
Crafting depth samples produced a negative depth for the last sample. This patch checks that negative last sample is ignored. (This occurred when last manual sample is not full minutes.) Signed-off-by: Miika Turkia <miika.turkia@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'xslt')
-rw-r--r--xslt/divelogs-export.xslt12
1 files changed, 7 insertions, 5 deletions
diff --git a/xslt/divelogs-export.xslt b/xslt/divelogs-export.xslt
index 287b28c18..614fafd5c 100644
--- a/xslt/divelogs-export.xslt
+++ b/xslt/divelogs-export.xslt
@@ -214,11 +214,13 @@
</xsl:call-template>
</xsl:when>
<xsl:otherwise>
- <SAMPLE>
- <DEPTH>
- <xsl:value-of select="$curdepth div 1000"/>
- </DEPTH>
- </SAMPLE>
+ <xsl:if test="$curdepth &gt; 0">
+ <SAMPLE>
+ <DEPTH>
+ <xsl:value-of select="$curdepth div 1000"/>
+ </DEPTH>
+ </SAMPLE>
+ </xsl:if>
</xsl:otherwise>
</xsl:choose>