]> cvs.zerfleddert.de Git - proxmark3-svn/blobdiff - linux/gui.c
Reduced the size of BigBuf to make more room for stack/vars
[proxmark3-svn] / linux / gui.c
index 2179a5ece819cc9bac131a67f46800a67bb4fb97..d31c5287702de3bbd035a7b92c793f4ede57199f 100644 (file)
@@ -9,13 +9,14 @@
 int GraphBuffer[MAX_GRAPH_TRACE_LEN];
 int GraphTraceLen;
 double CursorScaleFactor;
+int PlotGridX, PlotGridY;
 int CommandFinished;
 int offline;
 
 static char *logfilename = "proxmark3.log";
 
 void PrintToScrollback(char *fmt, ...) {
-       va_list argptr;
+       va_list argptr, argptr2;
        static FILE *logfile = NULL;
        static int logging=1;
 
@@ -28,7 +29,9 @@ void PrintToScrollback(char *fmt, ...) {
        }
 
        va_start(argptr, fmt);
+       va_copy(argptr2, argptr);
        vprintf(fmt, argptr);
+       va_end(argptr);
        printf("\n");
        if (logging && logfile) {
 #if 0
@@ -42,11 +45,11 @@ void PrintToScrollback(char *fmt, ...) {
 
                fprintf(logfile,"%s ", zeit);
 #endif
-               vfprintf(logfile, fmt, argptr);
+               vfprintf(logfile, fmt, argptr2);
                fprintf(logfile,"\n");
                fflush(logfile);
        }
-       va_end(argptr);
+       va_end(argptr2);
 }
 
 void setlogfilename(char *fn)
Impressum, Datenschutz