[Hotfix] Make sure we have a proper split size before assuming we can split it

This commit is contained in:
Akkadius 2023-01-20 12:25:49 -06:00
parent a16f21d6fe
commit 1f0b2a8991

View File

@ -263,6 +263,7 @@ void EQEmuLogSys::ProcessConsoleMessage(
if (log_category == Logs::LogCategory::MySQLQuery) {
auto s = Strings::Split(message, "--");
if (s.size() > 1) {
std::string query = Strings::Trim(s[0]);
std::string meta = Strings::Trim(s[1]);
@ -282,6 +283,7 @@ void EQEmuLogSys::ProcessConsoleMessage(
<<
rang::style::reset;
}
}
else if (Strings::Contains(message, "[")) {
for (auto &e: Strings::Split(message, " ")) {
if (Strings::Contains(e, "[") && Strings::Contains(e, "]")) {