made buffer in PaUtil_DebugPrint local rather than static to avoid multithreaded issues

This commit is contained in:
rossb 2009-12-23 05:35:08 +00:00
commit 6bd9c2fd1a

View file

@ -85,16 +85,18 @@ void PaUtil_SetDebugPrintFunction(PaUtilLogCallback cb)
#define SIZEDUMP 1024
static char strdump[SIZEDUMP];
void PaUtil_DebugPrint( const char *format, ... )
{
if (userCB)
{
char strdump[SIZEDUMP];
va_list ap;
va_start( ap, format );
VSNPRINTF( strdump, SIZEDUMP, format, ap );
strdump[SIZEDUMP-1] = 0;
userCB(strdump);
va_end( ap );
}