[apps] Move assert to where it matters

This commit is contained in:
Ruben Dashyan
2019-09-20 16:37:13 +02:00
committed by LeaNumworks
parent 312a19e760
commit d476e7944d
2 changed files with 1 additions and 1 deletions

View File

@@ -103,6 +103,7 @@ void VariableBoxController::willDisplayCellForIndex(HighlightCell * cell, int in
char symbolName[Shared::Function::k_maxNameWithArgumentSize];
size_t symbolLength = 0;
if (m_currentPage == Page::Expression) {
static_assert(Shared::Function::k_maxNameWithArgumentSize > Poincare::SymbolAbstract::k_maxNameSize, "Forgot argument's size?");
symbolLength = SymbolAbstract::TruncateExtension(symbolName, record.fullName(), SymbolAbstract::k_maxNameSize);
} else {
assert(m_currentPage == Page::Function);