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
222c174f0d
commit
94708aebd3
@ -415,6 +415,11 @@ FileSystemFactory(const char *iface, int *ret)
|
|||||||
void
|
void
|
||||||
mm_LogMessage(const char *msg, ...)
|
mm_LogMessage(const char *msg, ...)
|
||||||
{
|
{
|
||||||
|
static bool g_logging = false;
|
||||||
|
if (g_logging) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
g_logging = true;
|
||||||
va_list ap;
|
va_list ap;
|
||||||
static char buffer[2048];
|
static char buffer[2048];
|
||||||
|
|
||||||
@ -431,6 +436,7 @@ mm_LogMessage(const char *msg, ...)
|
|||||||
fprintf(stdout, "%s", buffer);
|
fprintf(stdout, "%s", buffer);
|
||||||
}
|
}
|
||||||
provider->ConsolePrint(buffer);
|
provider->ConsolePrint(buffer);
|
||||||
|
g_logging = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
Loading…
x
Reference in New Issue
Block a user