]> git.zerfleddert.de Git - proxmark3-svn/commitdiff
fixed an intermitent pain in the ass to track down crash in the GUI client due to...
authord18c7db <d18c7db@ef4ab9da-24cd-11de-8aaa-f3a34680c41f>
Sun, 19 Jul 2009 07:38:51 +0000 (07:38 +0000)
committerd18c7db <d18c7db@ef4ab9da-24cd-11de-8aaa-f3a34680c41f>
Sun, 19 Jul 2009 07:38:51 +0000 (07:38 +0000)
winsrc/gui.cpp

index fcdf3863f992d5c0d2140f685f0ea8ed4a6986bd..da83c865e7e82108e01d70cf803c9fde7921100a 100644 (file)
@@ -247,10 +247,12 @@ static void PaintGraph(HDC hdc)
                yMean /= n;\r
        }\r
 \r
                yMean /= n;\r
        }\r
 \r
-       char str[100];\r
+       char str[200];\r
+\r
        sprintf(str, "@%d   max=%d min=%d mean=%d n=%d/%d    dt=%d [%.3f] zoom=%.3f CursorA=%d [%d] CursorB=%d [%d]",\r
                GraphStart, yMax, yMin, yMean, n, GraphTraceLen,\r
        sprintf(str, "@%d   max=%d min=%d mean=%d n=%d/%d    dt=%d [%.3f] zoom=%.3f CursorA=%d [%d] CursorB=%d [%d]",\r
                GraphStart, yMax, yMin, yMean, n, GraphTraceLen,\r
-               CursorBPos - CursorAPos, (CursorBPos - CursorAPos)/CursorScaleFactor, GraphPixelsPerPoint, CursorAPos, GraphBuffer[CursorAPos], CursorBPos, GraphBuffer[CursorBPos]);\r
+               CursorBPos - CursorAPos, (CursorBPos - CursorAPos)/CursorScaleFactor, GraphPixelsPerPoint,\r
+               CursorAPos, GraphBuffer[CursorAPos], CursorBPos, GraphBuffer[CursorBPos]);\r
        TextOut(hdc, 50, r.bottom - 20, str, strlen(str));\r
 }\r
 \r
        TextOut(hdc, 50, r.bottom - 20, str, strlen(str));\r
 }\r
 \r
@@ -321,6 +323,7 @@ nopaint:
                        x -= offset;\r
                        x = (int)(x / GraphPixelsPerPoint);\r
                        x += GraphStart;\r
                        x -= offset;\r
                        x = (int)(x / GraphPixelsPerPoint);\r
                        x += GraphStart;\r
+\r
                        if(msg == WM_LBUTTONDOWN) {\r
                                CursorAPos = x;\r
                        } else {\r
                        if(msg == WM_LBUTTONDOWN) {\r
                                CursorAPos = x;\r
                        } else {\r
Impressum, Datenschutz