From 61c9b2891cbc7ae6de599467e2197f00cc30f854 Mon Sep 17 00:00:00 2001 From: Miika Turkia Date: Mon, 25 Apr 2016 21:23:22 +0300 Subject: [PATCH] Fix time parsing for Divesoft Freedom Divesoft uses 17 bits for time so parse accordingly. Signed-off-by: Miika Turkia Signed-off-by: Dirk Hohndel --- 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 e8782251e..746d4ce16 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: