From c0b79f46bf24a5154f445ef0fc0a7858e3c0912e 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 ba4d551..d4ae8aa 100644 --- a/src/suunto_d9_parser.c +++ b/src/suunto_d9_parser.c @@ -358,9 +358,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;