made buffer in PaUtil_DebugPrint local rather than static to avoid multithreaded issues
This commit is contained in:
parent
a979aceffd
commit
6bd9c2fd1a
1 changed files with 3 additions and 1 deletions
|
|
@ -85,16 +85,18 @@ void PaUtil_SetDebugPrintFunction(PaUtilLogCallback cb)
|
||||||
|
|
||||||
#define SIZEDUMP 1024
|
#define SIZEDUMP 1024
|
||||||
|
|
||||||
static char strdump[SIZEDUMP];
|
|
||||||
|
|
||||||
void PaUtil_DebugPrint( const char *format, ... )
|
void PaUtil_DebugPrint( const char *format, ... )
|
||||||
{
|
{
|
||||||
|
|
||||||
if (userCB)
|
if (userCB)
|
||||||
{
|
{
|
||||||
|
char strdump[SIZEDUMP];
|
||||||
|
|
||||||
va_list ap;
|
va_list ap;
|
||||||
va_start( ap, format );
|
va_start( ap, format );
|
||||||
VSNPRINTF( strdump, SIZEDUMP, format, ap );
|
VSNPRINTF( strdump, SIZEDUMP, format, ap );
|
||||||
|
strdump[SIZEDUMP-1] = 0;
|
||||||
userCB(strdump);
|
userCB(strdump);
|
||||||
va_end( ap );
|
va_end( ap );
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue