mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-16 07:30:42 +01:00
Core/Misc: Fix crash in ticket creation
Fix a crash happening with malicious CMSG_GMTICKET_CREATE packets.
This commit is contained in:
@@ -233,7 +233,7 @@ void GmTicket::SetChatLog(std::list<uint32> time, std::string const& log)
|
||||
std::stringstream ss(log);
|
||||
std::stringstream newss;
|
||||
std::string line;
|
||||
while (std::getline(ss, line))
|
||||
while (std::getline(ss, line) && !time.empty())
|
||||
{
|
||||
newss << secsToTimeString(time.front()) << ": " << line << "\n";
|
||||
time.pop_front();
|
||||
|
||||
Reference in New Issue
Block a user