mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-15 23:20:36 +01:00
Core/Channel: Fix CRT Debug Assert triggered with invalid channel names
(cherry picked from commit f0bd90cc35)
This commit is contained in:
@@ -47,7 +47,7 @@ void WorldSession::HandleJoinChannel(WorldPackets::Channel::JoinChannel& packet)
|
||||
if (packet.ChannelName.empty())
|
||||
return;
|
||||
|
||||
if (isdigit(packet.ChannelName[0]))
|
||||
if (isdigit((unsigned char)packet.ChannelName[0]))
|
||||
return;
|
||||
|
||||
if (ChannelMgr* cMgr = ChannelMgr::ForTeam(GetPlayer()->GetTeam()))
|
||||
|
||||
@@ -702,7 +702,7 @@ public:
|
||||
|
||||
amount = atoi(rankTxt);
|
||||
// try to find rank by name
|
||||
if ((amount == 0) && (rankTxt[0] != '-') && !isdigit(rankTxt[0]))
|
||||
if ((amount == 0) && (rankTxt[0] != '-') && !isdigit((unsigned char)rankTxt[0]))
|
||||
{
|
||||
std::string rankStr = rankTxt;
|
||||
std::wstring wrankStr;
|
||||
|
||||
Reference in New Issue
Block a user