From 8c27aef5cb195d0f62ea715fc9b1be1c5868d496 Mon Sep 17 00:00:00 2001 From: Arthur Guyader Date: Thu, 19 Dec 2019 15:43:52 +0100 Subject: converter : Add "0x" for hex data Change-Id: I9a46b0b87d56a73fb75fafafb0509ca66bb68dd3 Signed-off-by: Arthur Guyader Signed-off-by: Romain Forlot --- low-can-binding/utils/converter.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/low-can-binding/utils/converter.cpp b/low-can-binding/utils/converter.cpp index 6c9cedbb..56f3a449 100644 --- a/low-can-binding/utils/converter.cpp +++ b/low-can-binding/utils/converter.cpp @@ -32,6 +32,7 @@ std::string converter_t::to_hex(const uint8_t data[], const size_t length) { std::stringstream stream; stream << std::hex << std::setfill('0'); + stream << "0x"; for(int i = 0; i < length; i++) stream << std::setfill('0') << std::setw(2) << std::hex << ((int) data[i]); -- cgit 1.2.3-korg