1
0
Fork 0
mirror of https://github.com/anrieff/libcpuid synced 2024-12-16 16:35:45 +00:00

Using set_warn_function() with NULL crashes if warning were to be emitted. Fixed

git-svn-id: https://svn.code.sf.net/p/libcpuid/code/HEAD/libcpuid@18 3b4be424-7ac5-41d7-8526-f4ddcb85d872
This commit is contained in:
Veselin Georgiev 2008-11-18 22:39:14 +00:00
parent 9a0e7cf708
commit 5c348fd6bd

View file

@ -48,6 +48,7 @@ libcpuid_warn_fn_t _warn_fun = default_warn;
void warnf(const char* format, ...) void warnf(const char* format, ...)
{ {
if (!_warn_fun) return;
char buff[1024]; char buff[1024];
va_list va; va_list va;
va_start(va, format); va_start(va, format);