]> git.tdb.fi Git - ext/subsurface.git/blobdiff - uemis.c
XSLT to transform JDiveLog to Subsurface format
[ext/subsurface.git] / uemis.c
diff --git a/uemis.c b/uemis.c
index 5450bf38dc16e9ee462cd2bdc188866ae72d4ff4..f55407b4bc254ab0ee9a641b2b6075d996ce983e 100644 (file)
--- a/uemis.c
+++ b/uemis.c
@@ -14,7 +14,6 @@
 #include <stdlib.h>
 #define __USE_XOPEN
 #include <time.h>
-#include <regex.h>
 
 #include "dive.h"
 #include "uemis.h"
@@ -198,6 +197,8 @@ void uemis_parse_divelog_binary(char *base64, void *datap) {
        gasoffset = template = *(uint8_t *)(data+115);
        if (template == 3)
                gasoffset = 4;
+       if (template == 0)
+               template = 1;
        for (i = 0; i < template; i++) {
                float volume = *(float *)(data+116+25*(gasoffset + i)) * 1000.0;
                /* uemis always assumes a working pressure of 202.6bar (!?!?) - I first thought