mirror of
https://github.com/subsurface/subsurface.git
synced 2024-11-28 05:00:20 +00:00
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>
This commit is contained in:
parent
90db7d3a50
commit
61c9b2891c
1 changed files with 1 additions and 1 deletions
|
@ -3441,7 +3441,7 @@ int parse_dlf_buffer(unsigned char *buffer, size_t size)
|
||||||
while (ptr < buffer + size) {
|
while (ptr < buffer + size) {
|
||||||
time = ((ptr[0] >> 4) & 0x0f) +
|
time = ((ptr[0] >> 4) & 0x0f) +
|
||||||
((ptr[1] << 4) & 0xff0) +
|
((ptr[1] << 4) & 0xff0) +
|
||||||
(ptr[2] & 0x0f) * 3600; /* hours */
|
((ptr[2] << 12) & 0x1f000);
|
||||||
event = ptr[0] & 0x0f;
|
event = ptr[0] & 0x0f;
|
||||||
switch (event) {
|
switch (event) {
|
||||||
case 0:
|
case 0:
|
||||||
|
|
Loading…
Reference in a new issue