X-Git-Url: http://cvs.zerfleddert.de/cgi-bin/gitweb.cgi/proxmark3-svn/blobdiff_plain/c0d32c3186e5b11cf13394b10770cc1b6abab83f..refs/pull/185/head:/client/cmddata.c

diff --git a/client/cmddata.c b/client/cmddata.c
index 9854ccfa..ba161dd8 100644
--- a/client/cmddata.c
+++ b/client/cmddata.c
@@ -879,13 +879,15 @@ int CmdGraphShiftZero(const char *Cmd)
 int CmdAskEdgeDetect(const char *Cmd)
 {
 	int thresLen = 25;
+	int Last = 0;
 	sscanf(Cmd, "%i", &thresLen); 
 
 	for(int i = 1; i<GraphTraceLen; i++){
 		if (GraphBuffer[i]-GraphBuffer[i-1]>=thresLen) //large jump up
-			GraphBuffer[i-1] = 127;
+			Last = 127;
 		else if(GraphBuffer[i]-GraphBuffer[i-1]<=-1*thresLen) //large jump down
-			GraphBuffer[i-1] = -127;
+			Last = -127;
+		GraphBuffer[i-1] = Last;
 	}
 	RepaintGraphWindow();
 	return 0;