Core/PacketIO: Fixed handling CMSG_UPDATE_ACCOUNT_DATA - compressed value is not a null-terminated string

This commit is contained in:
Shauren
2024-08-05 14:13:17 +02:00
parent dabe1f85df
commit a4ecb2dfae
2 changed files with 6 additions and 11 deletions

View File

@@ -633,16 +633,13 @@ class TC_SHARED_API ByteBuffer
/// @todo Make a ByteBuffer.cpp and move all this inlining to it.
template<> inline std::string ByteBuffer::read<std::string>()
{
std::string tmp;
*this >> tmp;
return tmp;
return std::string(ReadCString());
}
template<>
inline void ByteBuffer::read_skip<char*>()
{
std::string temp;
*this >> temp;
(void)ReadCString();
}
template<>