1
0
Fork 0
mirror of https://github.com/luanti-org/luanti.git synced 2025-08-11 17:51:04 +00:00

(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
This commit is contained in:
SmallJoker 2020-09-20 13:12:55 +02:00 committed by Loïc Blot
parent ca5c2dbefa
commit 947466ab28
23 changed files with 168 additions and 223 deletions

View file

@ -802,7 +802,7 @@ void Server::AsyncRunStep(bool initial_step)
// u16 id
// std::string data
buffer.append(idbuf, sizeof(idbuf));
buffer.append(serializeString(aom.datastring));
buffer.append(serializeString16(aom.datastring));
}
}
/*
@ -1993,7 +1993,7 @@ void Server::SendActiveObjectRemoveAdd(RemoteClient *client, PlayerSAO *playersa
writeU8((u8*)buf, type);
data.append(buf, 1);
data.append(serializeLongString(
data.append(serializeString32(
obj->getClientInitializationData(client->net_proto_version)));
// Add to known objects