From: marshmellow42 Date: Thu, 30 Mar 2017 20:23:02 +0000 (-0400) Subject: Fix data mtrim (#262) X-Git-Tag: v3.0.0~22 X-Git-Url: https://git.zerfleddert.de/cgi-bin/gitweb.cgi/proxmark3-svn/commitdiff_plain/fa2aab705b96d128a133c3dbe54a3bffef1c3c4a?ds=sidebyside;hp=1f1f1955dc6521b9934d04677e9a3b5f23fa0e72 Fix data mtrim (#262) I don't even know what happened there... --- diff --git a/client/cmddata.c b/client/cmddata.c index ef1229c2..0595dffa 100644 --- a/client/cmddata.c +++ b/client/cmddata.c @@ -22,8 +22,6 @@ #include "cmdparser.h"// already included in cmdmain.h #include "usb_cmd.h" // already included in cmdmain.h and proxmark3.h #include "lfdemod.h" // for demod code -#include "crc.h" // for pyramid checksum maxim -#include "crc16.h" // for FDXB demod checksum #include "loclass/cipherutils.h" // for decimating samples in getsamples #include "cmdlfem4x.h"// for em410x demod @@ -1298,9 +1296,9 @@ int CmdMtrim(const char *Cmd) { if (start > GraphTraceLen || stop > GraphTraceLen || start > stop) return 0; start++; //leave start position sample - GraphTraceLen -= stop - start; + GraphTraceLen = stop - start; for (int i = 0; i < GraphTraceLen; i++) { - GraphBuffer[start+i] = GraphBuffer[stop+i]; + GraphBuffer[i] = GraphBuffer[start+i]; } return 0; }