1
0
mirror of https://github.com/alliedmodders/metamod-source.git synced 2024-11-28 10:24:20 +01:00

avoid infinite logging loops

This commit is contained in:
Kenzzer 2024-05-12 16:33:22 +02:00 committed by Nick Hastings
parent 222c174f0d
commit 94708aebd3

View File

@ -415,6 +415,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];
@ -431,6 +436,7 @@ mm_LogMessage(const char *msg, ...)
fprintf(stdout, "%s", buffer);
}
provider->ConsolePrint(buffer);
g_logging = false;
}
static void