[apps] Fix bug in variable box controller: when displaying a scalar

value, fix the buffer size which was overflowed
This commit is contained in:
Émilie Feral
2018-04-23 16:18:27 +02:00
committed by EmilieNumworks
parent 1669bee2f6
commit 538bf216be

View File

@@ -140,7 +140,7 @@ void VariableBoxController::ContentViewController::willDisplayCellForIndex(Highl
const Expression * evaluation = expressionForIndex(index);
if (m_currentPage == Page::Scalar) {
myCell->displayExpression(false);
char buffer[PrintFloat::bufferSizeForFloatsWithPrecision(Constant::LargeNumberOfSignificantDigits)];
char buffer[PrintFloat::k_maxComplexBufferLength];
evaluation->writeTextInBuffer(buffer, PrintFloat::bufferSizeForFloatsWithPrecision(Constant::LargeNumberOfSignificantDigits));
myCell->setSubtitle(buffer);
return;