X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=parse-xml.c;h=e0231ce465498b61f03adbdaaf2406c54303f499;hb=adc7280c025e68f6d55d779ad56712cb17aa3ae7;hp=892e0fb2014fe8abe99b5e7bbc5fd3e7565dc076;hpb=97419131248aacc96278ba7022b39af32359c26c;p=ext%2Fsubsurface.git diff --git a/parse-xml.c b/parse-xml.c index 892e0fb..e0231ce 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); }