X-Git-Url: http://git.zerfleddert.de/cgi-bin/gitweb.cgi/proxmark3-svn/blobdiff_plain/dbf444a179ec8639b790e795ac828c51b9da70fa..ba06a4b694da23045ed75d18ccf77a9befac65c0:/client/cmddata.c 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