[apps] Graph: fix error in Intersection Graph banner view: the text was

truncated
This commit is contained in:
Émilie Feral
2018-01-31 16:34:12 +01:00
committed by EmilieNumworks
parent a8fe8dc22e
commit cc4415b701

View File

@@ -30,9 +30,9 @@ void IntersectionGraphController::reloadBannerView() {
numberOfChar += legendLength;
buffer[0] = m_function->name()[0];
buffer[5] = m_intersectedFunction->name()[0];
numberOfChar += Complex<float>::convertFloatToText(m_cursor->y(), buffer+legendLength, PrintFloat::bufferSizeForFloatsWithPrecision(Constant::MediumNumberOfSignificantDigits), Constant::MediumNumberOfSignificantDigits);
numberOfChar += Complex<float>::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);
}