Fix #6390: Crash when renaming rides in multiplayer

This commit is contained in:
Mark van Renswoude 2017-10-14 14:17:36 +02:00 committed by Michael Steenbeek
parent 167662f651
commit ce73d3a8a5
2 changed files with 3 additions and 3 deletions

View File

@ -65,8 +65,8 @@ struct DataSerializerTraits<std::string>
static void encode(IStream *stream, const std::string& str)
{
uint16 len = (uint16)str.size();
len = ByteSwapBE(len);
stream->Write(&len);
uint16 swapped = ByteSwapBE(len);
stream->Write(&swapped);
stream->WriteArray(str.c_str(), len);
}
static void decode(IStream *stream, std::string& res)

View File

@ -51,7 +51,7 @@ typedef struct GameAction GameAction;
// This define specifies which version of network stream current build uses.
// It is used for making sure only compatible builds get connected, even within
// single OpenRCT2 version.
#define NETWORK_STREAM_VERSION "14"
#define NETWORK_STREAM_VERSION "15"
#define NETWORK_STREAM_ID OPENRCT2_VERSION "-" NETWORK_STREAM_VERSION
#ifdef __cplusplus