From 73cf134107925dac9658a90de2355365026dcb8e Mon Sep 17 00:00:00 2001 From: Koncord Date: Sun, 2 Jul 2017 11:11:33 +0800 Subject: [PATCH] [General] Fix incoming password string --- apps/browser/netutils/Utils.cpp | 3 ++- apps/openmw-mp/main.cpp | 4 +++- apps/openmw/mwmp/Networking.cpp | 3 ++- 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/apps/browser/netutils/Utils.cpp b/apps/browser/netutils/Utils.cpp index 623ecca8f..c18429063 100644 --- a/apps/browser/netutils/Utils.cpp +++ b/apps/browser/netutils/Utils.cpp @@ -65,7 +65,8 @@ ServerExtendedData getExtendedData(const char *addr, unsigned short port) RakNet::RakPeerInterface *peer = RakNet::RakPeerInterface::GetInstance(); peer->Startup(1, &socketDescriptor, 1); - stringstream sstr(TES3MP_VERSION); + stringstream sstr; + sstr << TES3MP_VERSION; sstr << TES3MP_PROTO_VERSION; std::string msg = ""; diff --git a/apps/openmw-mp/main.cpp b/apps/openmw-mp/main.cpp index dc2d15603..caf8b014f 100644 --- a/apps/openmw-mp/main.cpp +++ b/apps/openmw-mp/main.cpp @@ -251,9 +251,11 @@ int main(int argc, char *argv[]) RakNet::RakPeerInterface *peer = RakNet::RakPeerInterface::GetInstance(); - stringstream sstr(TES3MP_VERSION); + stringstream sstr; + sstr << TES3MP_VERSION; sstr << TES3MP_PROTO_VERSION; sstr << version.mCommitHash; + cout << sstr.str() << endl; peer->SetIncomingPassword(sstr.str().c_str(), (int) sstr.str().size()); diff --git a/apps/openmw/mwmp/Networking.cpp b/apps/openmw/mwmp/Networking.cpp index 2067a5fb9..ad156b9fc 100644 --- a/apps/openmw/mwmp/Networking.cpp +++ b/apps/openmw/mwmp/Networking.cpp @@ -249,7 +249,8 @@ void Networking::connect(const std::string &ip, unsigned short port, std::vector master.SetPortHostOrder(port); std::string errmsg = ""; - stringstream sstr(TES3MP_VERSION); + stringstream sstr; + sstr << TES3MP_VERSION; sstr << TES3MP_PROTO_VERSION; sstr << Version::getOpenmwVersion(Main::getResDir()).mCommitHash;