Fix data shiftgraphzero corrupting end of GraphBuffer

This commit is contained in:
Philippe Teuwen 2019-04-13 23:57:26 +02:00
parent 993728072a
commit 15f0fef555

View file

@ -928,10 +928,7 @@ static int CmdGraphShiftZero(const char *Cmd) {
sscanf(Cmd, "%i", &shift); sscanf(Cmd, "%i", &shift);
for (size_t i = 0; i < GraphTraceLen; i++) { for (size_t i = 0; i < GraphTraceLen; i++) {
if (i + shift >= GraphTraceLen) shiftedVal = GraphBuffer[i] + shift;
shiftedVal = GraphBuffer[i];
else
shiftedVal = GraphBuffer[i] + shift;
if (shiftedVal > 127) if (shiftedVal > 127)
shiftedVal = 127; shiftedVal = 127;