Core/Channel: Fix CRT Debug Assert triggered with invalid channel names

(cherry picked from commit f0bd90cc35098475b20e736cf98885c99c04be3d)
This commit is contained in:
jackpoz
2021-12-08 23:43:19 +01:00
committed by Shauren
parent 3796978a8f
commit 97249ff7b4
2 changed files with 2 additions and 2 deletions
+1 -1
View File
@@ -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()))
+1 -1
View File
@@ -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;