diff options
author | SmallJoker <mk939@ymail.com> | 2020-09-20 13:12:55 +0200 |
---|---|---|
committer | Loïc Blot <nerzhul@users.noreply.github.com> | 2020-10-01 09:52:59 +0200 |
commit | 947466ab28129fd69e6630974c6c4e901f2bebc6 (patch) | |
tree | 720b35a5f8c01e42a5078f7fb79d612d1a1484d9 /src/network | |
parent | ca5c2dbefab3676514e48b445b36de50993de9f1 (diff) | |
download | minetest-947466ab28129fd69e6630974c6c4e901f2bebc6.tar.gz minetest-947466ab28129fd69e6630974c6c4e901f2bebc6.tar.bz2 minetest-947466ab28129fd69e6630974c6c4e901f2bebc6.zip |
(se)SerializeString: Include max length in the name
This commit clarifies the maximal length of the serialized strings.
It will avoid accidental use of serializeString() when a larger string can be expected.
Removes unused Wide String serialization functions
Diffstat (limited to 'src/network')
-rw-r--r-- | src/network/clientpackethandler.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/network/clientpackethandler.cpp b/src/network/clientpackethandler.cpp index 8d87ff8f2..5683564a0 100644 --- a/src/network/clientpackethandler.cpp +++ b/src/network/clientpackethandler.cpp @@ -497,7 +497,7 @@ void Client::handleCommand_ActiveObjectMessages(NetworkPacket* pkt) if (!is.good()) break; - std::string message = deSerializeString(is); + std::string message = deSerializeString16(is); // Pass on to the environment m_env.processActiveObjectMessage(id, message); @@ -994,7 +994,7 @@ void Client::handleCommand_AddParticleSpawner(NetworkPacket* pkt) p.minsize = readF32(is); p.maxsize = readF32(is); p.collisiondetection = readU8(is); - p.texture = deSerializeLongString(is); + p.texture = deSerializeString32(is); server_id = readU32(is); @@ -1207,11 +1207,11 @@ void Client::handleCommand_HudSetSky(NetworkPacket* pkt) SkyboxParams skybox; skybox.bgcolor = video::SColor(readARGB8(is)); - skybox.type = std::string(deSerializeString(is)); + skybox.type = std::string(deSerializeString16(is)); u16 count = readU16(is); for (size_t i = 0; i < count; i++) - skybox.textures.emplace_back(deSerializeString(is)); + skybox.textures.emplace_back(deSerializeString16(is)); skybox.clouds = true; try { |