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

(cherry picked from commit f0bd90cc35)
This commit is contained in:
jackpoz
2019-05-29 21:12:50 +02:00
committed by Shauren
parent 3796978a8f
commit 97249ff7b4
2 changed files with 2 additions and 2 deletions

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()))

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;