X-Git-Url: https://git.zerfleddert.de/cgi-bin/gitweb.cgi/proxmark3-svn/blobdiff_plain/d801514d885fd8559c860d1f602945b8f6a7e5ab..cf08edc97cfdb89ae4c87260ceaed150364bfbc8:/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;