Core/Misc: Fixed some more issues found by static code analysis tools.
This commit is contained in:
1 parent
9c7de29e93
commit
4782cc4650
3 files changed
+22
-7
No files matched your search
@@ -43,7 +43,9 @@ ChannelMgr* ChannelMgr::forTeam(uint32 team)
|
||||
Channel* ChannelMgr::GetJoinChannel(std::string const& name, uint32 channelId)
|
||||
{
|
||||
std::wstring wname;
|
||||
Utf8toWStr(name, wname);
|
||||
if (!Utf8toWStr(name, wname))
|
||||
return NULL;
|
||||
|
||||
wstrToLower(wname);
|
||||
|
||||
ChannelMap::const_iterator i = channels.find(wname);
|
||||
@@ -61,7 +63,9 @@ Channel* ChannelMgr::GetJoinChannel(std::string const& name, uint32 channelId)
|
||||
Channel* ChannelMgr::GetChannel(std::string const& name, Player* player, bool pkt)
|
||||
{
|
||||
std::wstring wname;
|
||||
Utf8toWStr(name, wname);
|
||||
if (!Utf8toWStr(name, wname))
|
||||
return NULL;
|
||||
|
||||
wstrToLower(wname);
|
||||
|
||||
ChannelMap::const_iterator i = channels.find(wname);
|
||||
@@ -84,7 +88,9 @@ Channel* ChannelMgr::GetChannel(std::string const& name, Player* player, bool pk
|
||||
void ChannelMgr::LeftChannel(std::string const& name)
|
||||
{
|
||||
std::wstring wname;
|
||||
Utf8toWStr(name, wname);
|
||||
if (!Utf8toWStr(name, wname))
|
||||
return;
|
||||
|
||||
wstrToLower(wname);
|
||||
|
||||
ChannelMap::const_iterator i = channels.find(wname);
|
||||
|
||||
Reference in new issue
Block a user