diff --git a/base/applications/taskmgr/graphctl.c b/base/applications/taskmgr/graphctl.c index 0d15f4d61d8..4253eeadc35 100644 --- a/base/applications/taskmgr/graphctl.c +++ b/base/applications/taskmgr/graphctl.c @@ -150,7 +150,7 @@ GraphCtrl_AddPoint(PTM_GRAPH_CONTROL inst, BYTE val0, BYTE val1) t = inst->PointBuffer; Prev0 = *(t + inst->CurrIndex); Prev1 = *(t + inst->CurrIndex + inst->NumberOfPoints); - if (inst->CurrIndex < inst->NumberOfPoints) + if (inst->CurrIndex < inst->NumberOfPoints - 1) { inst->CurrIndex++; }