X-Git-Url: http://git.zerfleddert.de/cgi-bin/gitweb.cgi/proxmark3-svn/blobdiff_plain/9bea179a71188589f8e642f615177a108cea8d55..3628c31882e371997087ecc0249710340bf170e6:/winsrc/command.cpp diff --git a/winsrc/command.cpp b/winsrc/command.cpp index 5af6c709..454fbab2 100644 --- a/winsrc/command.cpp +++ b/winsrc/command.cpp @@ -301,17 +301,19 @@ static void CmdEM4x50read(char *str) while(i < GraphTraceLen) { // measure from low to low - while(GraphBuffer[i] > low) + while((GraphBuffer[i] > low) && (i low) + while((GraphBuffer[i] > low) && (i(MAX_GRAPH_TRACE_LEN/64)) { + break; + } tmpbuff[j++]= i - start; } - /* look for data start - should be 2 pairs of LW (pulses of 192,128) */ start= -1; skip= 0; @@ -331,7 +333,7 @@ static void CmdEM4x50read(char *str) /* skip over the remainder of the LW */ skip += tmpbuff[i+1]+tmpbuff[i+2]; - while(GraphBuffer[skip] > low) + while(skip < MAX_GRAPH_TRACE_LEN && GraphBuffer[skip] > low) ++skip; skip += 8; @@ -1573,7 +1575,7 @@ static void CmdTIWrite(char *str) if (res == 2) c.ext3=0; if (res<2) PrintToScrollback("Please specify 2 or three hex strings, eg 0x1234 0x5678"); - else + else SendCommand(&c, FALSE); }