1
0
mirror of https://github.com/alliedmodders/metamod-source.git synced 2025-02-26 19:54:14 +01:00

avoid infinite logging loops

This commit is contained in:
Kenzzer 2024-05-12 16:33:22 +02:00 committed by Nicholas Hastings
parent cbb1be3e30
commit 7dcc7ee3ea

View File

@ -417,6 +417,11 @@ FileSystemFactory(const char *iface, int *ret)
void
mm_LogMessage(const char *msg, ...)
{
static bool g_logging = false;
if (g_logging) {
return;
}
g_logging = true;
va_list ap;
static char buffer[2048];
@ -433,6 +438,7 @@ mm_LogMessage(const char *msg, ...)
fprintf(stdout, "%s", buffer);
}
provider->ConsolePrint(buffer);
g_logging = false;
}
static void