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:
parent
222c174f0d
commit
94708aebd3
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user