diff options
author | Andrei Karas <akaras@inbox.ru> | 2017-08-30 22:51:23 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2017-08-30 22:51:23 +0300 |
commit | ef8ef35d28daa3ea7dd542078ac9c0d3f7a9a5e2 (patch) | |
tree | c3d7c79fca18ac387d0c90512ef3201c92da5890 /src/net/eathena/chatrecv.cpp | |
parent | 22b64d16b613c1e5b26632237879b167024788ab (diff) | |
download | manaverse-ef8ef35d28daa3ea7dd542078ac9c0d3f7a9a5e2.tar.gz manaverse-ef8ef35d28daa3ea7dd542078ac9c0d3f7a9a5e2.tar.bz2 manaverse-ef8ef35d28daa3ea7dd542078ac9c0d3f7a9a5e2.tar.xz manaverse-ef8ef35d28daa3ea7dd542078ac9c0d3f7a9a5e2.zip |
Move some variables to better scope.
Diffstat (limited to 'src/net/eathena/chatrecv.cpp')
-rw-r--r-- | src/net/eathena/chatrecv.cpp | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/src/net/eathena/chatrecv.cpp b/src/net/eathena/chatrecv.cpp index d52183962..97f0de803 100644 --- a/src/net/eathena/chatrecv.cpp +++ b/src/net/eathena/chatrecv.cpp @@ -295,9 +295,16 @@ void ChatRecv::processGmChat2(Net::MessageIn &msg) msg.readInt16("font size"); msg.readInt16("font align"); msg.readInt16("font y"); - const std::string chatMsg = msg.readRawString(chatMsgLength, "message"); if (chatWindow != nullptr) + { + const std::string chatMsg = msg.readRawString(chatMsgLength, + "message"); chatWindow->addGlobalMessage(chatMsg); + } + else + { + msg.readRawString(chatMsgLength, "message"); + } } void ChatRecv::processWhisper(Net::MessageIn &msg) |