From 15f0fef55523180f1aba8d3e988671447fbf1f0a Mon Sep 17 00:00:00 2001 From: Philippe Teuwen Date: Sat, 13 Apr 2019 23:57:26 +0200 Subject: [PATCH] Fix data shiftgraphzero corrupting end of GraphBuffer --- client/cmddata.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/client/cmddata.c b/client/cmddata.c index a13cb3d8a..aa56debd2 100644 --- a/client/cmddata.c +++ b/client/cmddata.c @@ -928,10 +928,7 @@ static int CmdGraphShiftZero(const char *Cmd) { sscanf(Cmd, "%i", &shift); for (size_t i = 0; i < GraphTraceLen; i++) { - if (i + shift >= GraphTraceLen) - shiftedVal = GraphBuffer[i]; - else - shiftedVal = GraphBuffer[i] + shift; + shiftedVal = GraphBuffer[i] + shift; if (shiftedVal > 127) shiftedVal = 127;