Skip to content
Snippets Groups Projects
Commit a9b6c98f authored by Daniele Kruse's avatar Daniele Kruse
Browse files

Fixed the str() method of checksum to display the correct value

parent 5e8e6a99
No related branches found
No related tags found
No related merge requests found
......@@ -75,11 +75,8 @@ std::string cta::Checksum::str() const {
std::ostringstream oss;
if(0 < arraySize) {
const auto bytes = m_byteArray.getBytes();
oss << "0x";
for(uint32_t i = 0; i < arraySize; i++) {
oss << std::hex << bytes[i];
}
uint32_t checkSumInt32 = *((uint32_t *)(m_byteArray.getBytes()));
oss << "0x" << std::hex << checkSumInt32;
}
return oss.str();
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment