summaryrefslogtreecommitdiffstats
path: root/parse-xml.c
diff options
context:
space:
mode:
authorGravatar Anton Lundin <glance@acc.umu.se>2015-10-04 14:03:49 +0200
committerGravatar Dirk Hohndel <dirk@hohndel.org>2015-10-04 16:29:35 +0100
commit331a340780a685dda1e9427b915fbd94a9928bef (patch)
tree6657706b1e016ebc5f27851e54136058ed24f522 /parse-xml.c
parenta02ea685823f6474da7de51875b1ed2970b10eba (diff)
downloadsubsurface-331a340780a685dda1e9427b915fbd94a9928bef.tar.gz
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>
Diffstat (limited to 'parse-xml.c')
-rw-r--r--parse-xml.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/parse-xml.c b/parse-xml.c
index b2bc76f0c..5f4b667c5 100644
--- a/parse-xml.c
+++ b/parse-xml.c
@@ -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.
*/
static timestamp_t parse_dlf_timestamp(unsigned char *buffer)
{
timestamp_t offset;
- offset = (signed char) buffer[3];
+ offset = buffer[3];
offset = (offset << 8) + buffer[2];
offset = (offset << 8) + buffer[1];
offset = (offset << 8) + buffer[0];