summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--parse-xml.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/parse-xml.c b/parse-xml.c
index 892e0fb20..e0231ce46 100644
--- a/parse-xml.c
+++ b/parse-xml.c
@@ -326,6 +326,9 @@ static void percent(char *buffer, void *_fraction)
static void gasmix(char *buffer, void *_fraction)
{
+ /* libdivecomputer does negative percentages. */
+ if (*buffer == '-')
+ return;
if (gasmix_index < MAX_MIXES)
percent(buffer, _fraction);
}