Divesoft uses 17 bits for time so parse accordingly.

Signed-off-by: Miika Turkia <[email protected]>
---
 core/parse-xml.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/core/parse-xml.c b/core/parse-xml.c
index e878225..746d4ce 100644
--- a/core/parse-xml.c
+++ b/core/parse-xml.c
@@ -3441,7 +3441,7 @@ int parse_dlf_buffer(unsigned char *buffer, size_t size)
        while (ptr < buffer + size) {
                time = ((ptr[0] >> 4) & 0x0f) +
                        ((ptr[1] << 4) & 0xff0) +
-                       (ptr[2] & 0x0f) * 3600; /* hours */
+                       ((ptr[2] << 12) & 0x1f000);
                event = ptr[0] & 0x0f;
                switch (event) {
                case 0:
-- 
2.5.0

_______________________________________________
subsurface mailing list
[email protected]
http://lists.subsurface-divelog.org/cgi-bin/mailman/listinfo/subsurface

Reply via email to