X-Git-Url: http://cvs.zerfleddert.de/cgi-bin/gitweb.cgi/proxmark3-svn/blobdiff_plain/dbf444a179ec8639b790e795ac828c51b9da70fa..845ea63b7cf7dfcfc43d506be61da35021b0256f:/client/cmddata.c?ds=inline diff --git a/client/cmddata.c b/client/cmddata.c index 05a375c5..5c61e536 100644 --- a/client/cmddata.c +++ b/client/cmddata.c @@ -1,3 +1,13 @@ +//----------------------------------------------------------------------------- +// Copyright (C) 2010 iZsh +// +// This code is licensed to you under the terms of the GNU GPL, version 2 or, +// at your option, any later version. See the LICENSE.txt file for the text of +// the license. +//----------------------------------------------------------------------------- +// Data and Graph commands +//----------------------------------------------------------------------------- + #include #include #include @@ -524,7 +534,7 @@ int CmdManchesterDemod(const char *Cmd) int i, j, invert= 0; int bit; int clock; - int lastval; + int lastval = 0; int low = 0; int high = 0; int hithigh, hitlow, first; @@ -534,10 +544,11 @@ int CmdManchesterDemod(const char *Cmd) int warnings = 0; /* check if we're inverting output */ - if (*Cmd == 'i') + if (*(Cmd + 1) == 'i') { PrintAndLog("Inverting output"); invert = 1; + ++Cmd; do ++Cmd; while(*Cmd == ' '); // in case a 2nd argument was given