See man.
By chance it worked on 32-bit platforms but on a 64-bit it crashed.
static char *logfilename = "proxmark3.log";
void PrintToScrollback(char *fmt, ...) {
static char *logfilename = "proxmark3.log";
void PrintToScrollback(char *fmt, ...) {
+ va_list argptr, argptr2;
static FILE *logfile = NULL;
static int logging=1;
static FILE *logfile = NULL;
static int logging=1;
+ va_copy(argptr2, argptr);
printf("\n");
if (logging && logfile) {
#if 0
printf("\n");
if (logging && logfile) {
#if 0
fprintf(logfile,"%s ", zeit);
#endif
fprintf(logfile,"%s ", zeit);
#endif
- vfprintf(logfile, fmt, argptr);
+ vfprintf(logfile, fmt, argptr2);
fprintf(logfile,"\n");
fflush(logfile);
}
fprintf(logfile,"\n");
fflush(logfile);
}
}
void setlogfilename(char *fn)
}
void setlogfilename(char *fn)