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

This commit is contained in:
jackpoz
2019-05-29 21:12:50 +02:00
parent 22888f80e9
commit f0bd90cc35
2 changed files with 2 additions and 2 deletions

View File

@@ -49,7 +49,7 @@ void WorldSession::HandleJoinChannel(WorldPacket& recvPacket)
return;
}
if (channelName.empty() || isdigit(channelName[0]))
if (channelName.empty() || isdigit((unsigned char)channelName[0]))
{
WorldPacket data(SMSG_CHANNEL_NOTIFY, 1 + channelName.size());
data << uint8(CHAT_INVALID_NAME_NOTICE) << channelName;

View File

@@ -728,7 +728,7 @@ public:
return false;
amount = atoi(rankTxt);
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;