From f83e53554021a93e280c3faa9a6e6d436b0e1572 Mon Sep 17 00:00:00 2001 From: Christopher Peplin Date: Sat, 27 Sep 2014 16:10:57 -0400 Subject: Fix rendering of message arb ID in strings - use hex, not decimal. --- src/uds/uds.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/uds/uds.c b/src/uds/uds.c index ed46b4a9..d5a40bcf 100644 --- a/src/uds/uds.c +++ b/src/uds/uds.c @@ -314,8 +314,8 @@ float diagnostic_decode_obd2_pid(const DiagnosticResponse* response) { void diagnostic_response_to_string(const DiagnosticResponse* response, char* destination, size_t destination_length) { int bytes_used = snprintf(destination, destination_length, - "arb_id: 0x%" SCNd32 ", mode: 0x%x, ", - response->arbitration_id, + "arb_id: 0x%lx, mode: 0x%x, ", + (unsigned long) response->arbitration_id, response->mode); if(response->has_pid) { @@ -351,8 +351,8 @@ void diagnostic_response_to_string(const DiagnosticResponse* response, void diagnostic_request_to_string(const DiagnosticRequest* request, char* destination, size_t destination_length) { int bytes_used = snprintf(destination, destination_length, - "arb_id: 0x%" SCNd32 ", mode: 0x%x, ", - request->arbitration_id, + "arb_id: 0x%lx, mode: 0x%x, ", + (unsigned long) request->arbitration_id, request->mode); if(request->has_pid) { -- cgit 1.2.3-korg