summaryrefslogtreecommitdiff
path: root/src/network/clientpackethandler.cpp
diff options
context:
space:
mode:
authorest31 <MTest31@outlook.com>2015-04-22 14:10:39 +0200
committerest31 <MTest31@outlook.com>2015-04-22 14:10:39 +0200
commitccc09abc2d4a712c17de833d52cb5aa91b7bf980 (patch)
tree08b2d18ed3428707ee18f6ac30d8ca788569b9d9 /src/network/clientpackethandler.cpp
parenteec01bc2fabbefbe0d0c008011592d49f8bbd18e (diff)
downloadminetest-ccc09abc2d4a712c17de833d52cb5aa91b7bf980.tar.gz
minetest-ccc09abc2d4a712c17de833d52cb5aa91b7bf980.tar.bz2
minetest-ccc09abc2d4a712c17de833d52cb5aa91b7bf980.zip
Protocol 25: wstring -> string for custom access denial reasons
Also fix std::logic_error when server::DenyAccess() is used with only two arguments.
Diffstat (limited to 'src/network/clientpackethandler.cpp')
-rw-r--r--src/network/clientpackethandler.cpp4
1 files changed, 1 insertions, 3 deletions
diff --git a/src/network/clientpackethandler.cpp b/src/network/clientpackethandler.cpp
index 68d4245f8..bddf8f6fd 100644
--- a/src/network/clientpackethandler.cpp
+++ b/src/network/clientpackethandler.cpp
@@ -149,9 +149,7 @@ void Client::handleCommand_AccessDenied(NetworkPacket* pkt)
u8 denyCode = SERVER_ACCESSDENIED_UNEXPECTED_DATA;
*pkt >> denyCode;
if (denyCode == SERVER_ACCESSDENIED_CUSTOM_STRING) {
- std::wstring wide_reason;
- *pkt >> wide_reason;
- m_access_denied_reason = wide_to_narrow(wide_reason);
+ *pkt >> m_access_denied_reason;
}
else if (denyCode < SERVER_ACCESSDENIED_MAX) {
m_access_denied_reason = accessDeniedStrings[denyCode];