Fix console_enable_colors not being used

This commit is contained in:
Robert Müller 2023-03-22 22:11:47 +01:00
parent 8057d591db
commit 6760532491

View file

@ -341,8 +341,8 @@ LOG_COLOR ColorToLogColor(ColorRGBA Color)
void CConsole::Print(int Level, const char *pFrom, const char *pStr, ColorRGBA PrintColor) const
{
LEVEL LogLevel = IConsole::ToLogLevel(Level);
// if the color is pure white, use default terminal color
if(mem_comp(&PrintColor, &gs_ConsoleDefaultColor, sizeof(ColorRGBA)) != 0)
// if console colors are not enabled or if the color is pure white, use default terminal color
if(g_Config.m_ConsoleEnableColors && mem_comp(&PrintColor, &gs_ConsoleDefaultColor, sizeof(ColorRGBA)) != 0)
{
log_log_color(LogLevel, ColorToLogColor(PrintColor), pFrom, "%s", pStr);
}