From 7d97b4b841225a057f111e790338b6730e8a44c3 Mon Sep 17 00:00:00 2001 From: Shauren Date: Wed, 6 Aug 2014 10:00:23 +0200 Subject: Core/Misc: Fixed textlike/hexlike methods of ByteBuffer to print properly --- src/server/shared/Packets/ByteBuffer.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src') diff --git a/src/server/shared/Packets/ByteBuffer.cpp b/src/server/shared/Packets/ByteBuffer.cpp index 0a911492f85..86234039a4a 100644 --- a/src/server/shared/Packets/ByteBuffer.cpp +++ b/src/server/shared/Packets/ByteBuffer.cpp @@ -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(i)); + char buf[2]; + snprintf(buf, 2, "%c", read(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(i)); + snprintf(buf, 3, "%2X ", read(i)); if ((i == (j * 8)) && ((i != (k * 16)))) { o << "| "; -- cgit v1.2.3