1
0
Fork 0
mirror of https://github.com/opentx/opentx.git synced 2025-07-15 20:35:17 +03:00

Compilation fix for Visual Studio

This commit is contained in:
Bertrand Songis 2015-09-01 07:29:07 +02:00
parent 5b4d9cd7d7
commit c907c20705

View file

@ -42,19 +42,20 @@ traceCallbackFunc traceCallback = 0;
#endif
#if defined(SIMU)
#define PRINTF_BUFFER_SIZE 1024
void debugPrintf(const char * format, ...)
{
va_list arglist;
char * str;
char tmp[PRINTF_BUFFER_SIZE];
va_start(arglist, format);
vasprintf(&str, format, arglist);
vsnprintf(tmp, PRINTF_BUFFER_SIZE, format, arglist);
va_end(arglist);
fputs(str, stdout);
fputs(tmp, stdout);
fflush(stdout);
if (traceCallback) {
traceCallback(str);
traceCallback(tmp);
}
free(str);
}
#endif