We received an interesting case of a dive computer whose battery died during a dive. Apparantly the device recorded some samples, but failed to terminate the dive properly. In the linked list, the next pointer of this dive points to itself, which is obviously an invalid value. I suspect the device initializes the next pointer to point to itself at the start of a new dive, and updates it again with the correct value once the dive has finished. But due to the battery failure, that last step never happened. Anyway, since we are traversing the linked list backwards, we don't need the next pointer, and we can simply skip the incomplete dive. The error is not returned immediately anymore, but delayed until the end of the download.
Description
No description provided
Languages
C
98.3%
M4
1.2%
Makefile
0.5%