diff --git a/apps/graph/graph/intersection_graph_controller.cpp b/apps/graph/graph/intersection_graph_controller.cpp index 2d9a9421a..7d66a3bd4 100644 --- a/apps/graph/graph/intersection_graph_controller.cpp +++ b/apps/graph/graph/intersection_graph_controller.cpp @@ -30,9 +30,9 @@ void IntersectionGraphController::reloadBannerView() { numberOfChar += legendLength; buffer[0] = m_function->name()[0]; buffer[5] = m_intersectedFunction->name()[0]; - numberOfChar += Complex::convertFloatToText(m_cursor->y(), buffer+legendLength, PrintFloat::bufferSizeForFloatsWithPrecision(Constant::MediumNumberOfSignificantDigits), Constant::MediumNumberOfSignificantDigits); + numberOfChar += Complex::convertFloatToText(m_cursor->y(), buffer+numberOfChar, PrintFloat::bufferSizeForFloatsWithPrecision(Constant::MediumNumberOfSignificantDigits), Constant::MediumNumberOfSignificantDigits); strlcpy(buffer+numberOfChar, space, spaceLength+1); - buffer[FunctionBannerDelegate::k_maxDigitLegendLength+5] = 0; + buffer[FunctionBannerDelegate::k_maxDigitLegendLength+legendLength] = 0; bannerView()->setLegendAtIndex(buffer, 1); }