X-Git-Url: https://git.zerfleddert.de/cgi-bin/gitweb.cgi/proxmark3-svn/blobdiff_plain/d801514d885fd8559c860d1f602945b8f6a7e5ab..2f6df13cf716d1c7d1da3accff3435598266db32:/client/cmddata.c diff --git a/client/cmddata.c b/client/cmddata.c index eb12fc84..acb1359e 100644 --- a/client/cmddata.c +++ b/client/cmddata.c @@ -969,17 +969,17 @@ int CmdUndec(const char *Cmd) //shift graph zero up or down based on input + or - int CmdGraphShiftZero(const char *Cmd) { - int shift=0; + int shift = 0, shiftedVal = 0; //set options from parameters entered with the command sscanf(Cmd, "%i", &shift); - int shiftedVal=0; + for(int i = 0; i127) - shiftedVal=127; - else if (shiftedVal<-127) - shiftedVal=-127; - GraphBuffer[i]= shiftedVal; + if (shiftedVal > 127) + shiftedVal = 127; + else if (shiftedVal < -127) + shiftedVal = -127; + GraphBuffer[i] = shiftedVal; } CmdNorm(""); return 0;