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:
parent
cbb1be3e30
commit
7dcc7ee3ea
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user