1
0
Fork 1
mirror of https://github.com/TES3MP/openmw-tes3mp.git synced 2025-01-16 19:19:56 +00:00

[General] Avoid limitation of 512 symbols in RakString Ctor

This commit is contained in:
Koncord 2017-09-03 18:53:45 +08:00
parent 74c9a26d16
commit d904628103

View file

@ -80,11 +80,17 @@ namespace mwmp
{ {
if (write) if (write)
{ {
RakNet::RakString rstr("%s", str.c_str());
if (compress) if (compress)
rstr.SerializeCompressed(bs); {
if (!str.empty())
RakNet::RakString::SerializeCompressed(str.c_str(), bs);
}
else else
{
RakNet::RakString rstr;
rstr = str.c_str();
bs->Write(rstr); bs->Write(rstr);
}
} }
else else
{ {