mirror of
https://github.com/Xahau/xahaud.git
synced 2025-12-06 17:27:52 +00:00
Fix conversion of binary data to hexadecimal strings in some cases.
This commit is contained in:
committed by
Vinnie Falco
parent
8a608b5829
commit
bd60a93cd6
@@ -224,9 +224,15 @@ public:
|
||||
std::string getHex () const
|
||||
{
|
||||
std::stringstream h;
|
||||
h << std::hex << std::setfill ('0');
|
||||
|
||||
for (unsigned char const& element : mData)
|
||||
h << std::setw (2) << element;
|
||||
{
|
||||
h <<
|
||||
std::setw (2) <<
|
||||
std::hex <<
|
||||
std::setfill ('0') <<
|
||||
static_cast<unsigned int>(element);
|
||||
}
|
||||
return h.str ();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user