mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-16 07:30:42 +01:00
Core/Misc: Fixed textlike/hexlike methods of ByteBuffer to print properly
This commit is contained in:
@@ -69,8 +69,8 @@ void ByteBuffer::textlike() const
|
||||
o << "STORAGE_SIZE: " << size();
|
||||
for (uint32 i = 0; i < size(); ++i)
|
||||
{
|
||||
char buf[1];
|
||||
snprintf(buf, 1, "%c", read<uint8>(i));
|
||||
char buf[2];
|
||||
snprintf(buf, 2, "%c", read<uint8>(i));
|
||||
o << buf;
|
||||
}
|
||||
o << " ";
|
||||
@@ -90,7 +90,7 @@ void ByteBuffer::hexlike() const
|
||||
for (uint32 i = 0; i < size(); ++i)
|
||||
{
|
||||
char buf[3];
|
||||
snprintf(buf, 1, "%2X ", read<uint8>(i));
|
||||
snprintf(buf, 3, "%2X ", read<uint8>(i));
|
||||
if ((i == (j * 8)) && ((i != (k * 16))))
|
||||
{
|
||||
o << "| ";
|
||||
|
||||
Reference in New Issue
Block a user