]> git.zerfleddert.de Git - proxmark3-svn/blobdiff - client/cmddata.c
CHG; syntax suger
[proxmark3-svn] / client / cmddata.c
index eb12fc8496a8354bc9b20e600bed67a92d98acd8..acb1359e8c13d93c7e29f89176542c18418c66fa 100644 (file)
@@ -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; i<GraphTraceLen; i++){
                shiftedVal=GraphBuffer[i]+shift;
-               if (shiftedVal>127) 
-                       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;
Impressum, Datenschutz