mirror of
https://github.com/anrieff/libcpuid
synced 2024-12-26 16:55:45 +00:00
Fix SEGFAULT in debugf() when using --quiet
The `--quiet` option calls `cpuid_set_warn_function(NULL)`, but debugf() was not checking if _warn_fun is defined unlike warnf()
This commit is contained in:
parent
afbc2e5a4a
commit
8f6b84d86c
1 changed files with 1 additions and 1 deletions
|
@ -73,7 +73,7 @@ void debugf(int verboselevel, const char* format, ...)
|
|||
{
|
||||
char buff[1024];
|
||||
va_list va;
|
||||
if (verboselevel > _current_verboselevel) return;
|
||||
if (!_warn_fun || (verboselevel > _current_verboselevel)) return;
|
||||
va_start(va, format);
|
||||
vsnprintf(buff, sizeof(buff), format, va);
|
||||
va_end(va);
|
||||
|
|
Loading…
Reference in a new issue