mirror of
https://github.com/DarkflameUniverse/DarkflameServer.git
synced 2025-11-20 00:52:33 +00:00
fix: chat server crash (#1931)
* fix: chat server crash * Update dChatServer/ChatServer.cpp Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --------- Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
This commit is contained in:
@@ -184,7 +184,7 @@ static void DLOG(char ch, void *param) {
|
||||
static size_t len{};
|
||||
if (ch != '\n') buf[len++] = ch; // we provide the newline in our logger
|
||||
if (ch == '\n' || len >= sizeof(buf)) {
|
||||
LOG_DEBUG("%.*s", static_cast<int>(len), buf);
|
||||
if (Game::logger) LOG_DEBUG("%.*s", static_cast<int>(len), buf);
|
||||
len = 0;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user