From ddfdb6c306cfaf8f5745d7e070212664650a1b03 Mon Sep 17 00:00:00 2001 From: Linus Torvalds Date: Mon, 24 Nov 2014 11:08:59 -0800 Subject: [PATCH] Fix suunto serial numbers libdivecomputer has already done the "byte to decimal" conversion. Signed-off-by: Linus Torvalds Signed-off-by: Dirk Hohndel --- src/suunto_d9_parser.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/suunto_d9_parser.c b/src/suunto_d9_parser.c index 86771ff..9931814 100644 --- a/src/suunto_d9_parser.c +++ b/src/suunto_d9_parser.c @@ -360,9 +360,7 @@ suunto_d9_parser_get_field (dc_parser_t *abstract, dc_field_type_t type, unsigne switch (flags) { case 0: /* serial */ string->desc = "Serial"; - snprintf(buf, BUFLEN, "%02d%02d%02d%02d", (parser->serial >> 24) & 0xff, - (parser->serial >> 16) & 0xff, (parser->serial >> 8) & 0xff, - parser->serial & 0xff); + snprintf(buf, BUFLEN, "%08u", parser->serial); break; default: return DC_STATUS_UNSUPPORTED;