[poincare] LayoutHelper::String second parameter is a length, not size

This commit is contained in:
Léa Saviot
2018-11-19 11:20:58 +01:00
committed by Émilie Feral
parent a289d77425
commit 5e404736b3
4 changed files with 9 additions and 9 deletions

View File

@@ -84,8 +84,8 @@ void VariableBoxEmptyController::setType(Type type) {
messages[0] = I18n::Message::EmptyExpressionBox0;
messages[1] = I18n::Message::EmptyExpressionBox1;
messages[2] = I18n::Message::EmptyExpressionBox2;
char storeExpression[] = {'3', Ion::Charset::Sto, 'A', 0};
layout = LayoutHelper::String(storeExpression, sizeof(storeExpression)-1, VariableBoxEmptyView::k_font);
char storeExpression[] = {'3', Ion::Charset::Sto, 'A'};
layout = LayoutHelper::String(storeExpression, sizeof(storeExpression), VariableBoxEmptyView::k_font);
break;
}
case Type::Functions:
@@ -93,8 +93,8 @@ void VariableBoxEmptyController::setType(Type type) {
messages[0] = I18n::Message::EmptyFunctionBox0;
messages[1] = I18n::Message::EmptyFunctionBox1;
messages[2] = I18n::Message::EmptyFunctionBox2;
char storeFunction[] = {'3', '+', Graph::StorageCartesianFunctionStore::Symbol(), Ion::Charset::Sto, 'f', '(', Graph::StorageCartesianFunctionStore::Symbol(), ')', 0};
layout = LayoutHelper::String(storeFunction, sizeof(storeFunction)-1, VariableBoxEmptyView::k_font);
char storeFunction[] = {'3', '+', Graph::StorageCartesianFunctionStore::Symbol(), Ion::Charset::Sto, 'f', '(', Graph::StorageCartesianFunctionStore::Symbol(), ')'};
layout = LayoutHelper::String(storeFunction, sizeof(storeFunction), VariableBoxEmptyView::k_font);
break;
}
default: