mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
Correct sign on Divesoft Freedom timestamps
I managed somehow to miss-read and by accident told Linus that the timestamp was signed. It is a unsigned uint32_t, so this corrects the mistake i tricked Linus into making. Signed-off-by: Anton Lundin <glance@acc.umu.se> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
parent
a02ea68582
commit
331a340780
1 changed files with 2 additions and 2 deletions
|
@ -3247,14 +3247,14 @@ int parse_divinglog_buffer(sqlite3 *handle, const char *url, const char *buffer,
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Parse a signed 32-bit integer in little-endian mode,
|
* Parse a unsigned 32-bit integer in little-endian mode,
|
||||||
* that is seconds since Jan 1, 2000.
|
* that is seconds since Jan 1, 2000.
|
||||||
*/
|
*/
|
||||||
static timestamp_t parse_dlf_timestamp(unsigned char *buffer)
|
static timestamp_t parse_dlf_timestamp(unsigned char *buffer)
|
||||||
{
|
{
|
||||||
timestamp_t offset;
|
timestamp_t offset;
|
||||||
|
|
||||||
offset = (signed char) buffer[3];
|
offset = buffer[3];
|
||||||
offset = (offset << 8) + buffer[2];
|
offset = (offset << 8) + buffer[2];
|
||||||
offset = (offset << 8) + buffer[1];
|
offset = (offset << 8) + buffer[1];
|
||||||
offset = (offset << 8) + buffer[0];
|
offset = (offset << 8) + buffer[0];
|
||||||
|
|
Loading…
Add table
Reference in a new issue