diff options
author | Miika Turkia <miika.turkia@gmail.com> | 2016-04-25 21:23:22 +0300 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2016-04-25 11:25:34 -0700 |
commit | 61c9b2891cbc7ae6de599467e2197f00cc30f854 (patch) | |
tree | 7c940bc80aa53dccf011197f93d0bfbd6399b281 /core/parse-xml.c | |
parent | 90db7d3a50a802d6299e7c55b0798bb300915570 (diff) | |
download | subsurface-61c9b2891cbc7ae6de599467e2197f00cc30f854.tar.gz |
Fix time parsing for Divesoft Freedom
Divesoft uses 17 bits for time so parse accordingly.
Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'core/parse-xml.c')
-rw-r--r-- | core/parse-xml.c | 2 |
1 files changed, 1 insertions, 1 deletions
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: |