Merge pull request #237 from XLabsProject/fix-chat-crash
Fix chat crash (Client side only)
This commit is contained in:
commit
404392a9fa
@ -110,6 +110,7 @@ namespace Components
|
||||
inputBuffer += lastFontIconPos - lineBuffer;
|
||||
lineBuffer = lastFontIconPos;
|
||||
}
|
||||
|
||||
*lineBuffer = 0;
|
||||
len = 0.0f;
|
||||
Game::cgsArray[0].teamChatMsgTimes[Game::cgsArray[0].teamChatPos % chatHeight] = Game::cgArray[0].time;
|
||||
@ -132,7 +133,7 @@ namespace Components
|
||||
const auto chatHeight = (*cg_chatHeight)->current.integer;
|
||||
const auto chatWidth = static_cast<float>(cg_chatWidth.get<int>());
|
||||
const auto chatTime = (*cg_chatTime)->current.integer;
|
||||
if (chatHeight < 0 || static_cast<unsigned>(chatHeight) > std::extent_v<decltype(Game::cgs_t::teamChatMsgs)> || chatWidth <= 0 || chatTime <= 0)
|
||||
if (chatHeight <= 0 || static_cast<unsigned>(chatHeight) > std::extent_v<decltype(Game::cgs_t::teamChatMsgs)> || chatWidth <= 0 || chatTime <= 0)
|
||||
{
|
||||
Game::cgsArray[0].teamLastChatPos = 0;
|
||||
Game::cgsArray[0].teamChatPos = 0;
|
||||
|
Loading…
Reference in New Issue
Block a user