diff options
| author | 2024-10-04 12:49:48 -0400 | |
|---|---|---|
| committer | 2024-10-04 12:49:48 -0400 | |
| commit | 2e136aa341fead57ee60ad8f1718cb9584baa03b (patch) | |
| tree | 2bce016fc310bbe631fcf4ab751caa0a8490ba9e /src | |
| parent | bd79d0b57f76f290bffcd8749f60f7e5870d998a (diff) | |
| download | libalabaster-2e136aa341fead57ee60ad8f1718cb9584baa03b.tar.gz libalabaster-2e136aa341fead57ee60ad8f1718cb9584baa03b.tar.bz2 libalabaster-2e136aa341fead57ee60ad8f1718cb9584baa03b.zip | |
log: Accept NULL section
Signed-off-by: Andrew Opalach <andrew@akon.city>
Diffstat (limited to 'src')
| -rw-r--r-- | src/log.c | 4 |
1 files changed, 3 insertions, 1 deletions
@@ -1,6 +1,6 @@ #include "../include/al/log.h" -//#define AL_LOG_SKIP +#define AL_LOG_SKIP #define AL_LOG_MESSAGE_SIZE 511 #define AL_LOG_USE_SECTION #ifdef AL_LOG_USE_SECTION @@ -51,6 +51,7 @@ s32 _al_log(const char *level, const char *section, const char *name, const s32 #else va_list args; va_start(args, fmt); + if (!section) section = ""; #ifdef AL_LOG_SKIP s32 ret = al_printf(AL_LOG_TEMPLATE, name, line, func, level, section); ret += al_vprintf(fmt, args); @@ -72,6 +73,7 @@ s32 _al_logv(const char *level, const char *section, const char *name, const s32 #if AL_FORCE_DISABLE_OUTPUT return 0; #else + if (!section) section = ""; #ifdef AL_LOG_SKIP s32 ret = al_printf(AL_LOG_TEMPLATE, name, line, func, level, section); ret += al_vprintf(fmt, args); |