From 173288dd910d8ed5c936ec07bc9aba2d2811d3a3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?L=C3=A9a=20Saviot?= Date: Tue, 12 Jun 2018 14:37:32 +0200 Subject: [PATCH] [apps/shared] Fix variables buffer initialisation for getVariables --- apps/shared/store_controller.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/apps/shared/store_controller.cpp b/apps/shared/store_controller.cpp index dc8c1c2f5..8cb7dbaa6 100644 --- a/apps/shared/store_controller.cpp +++ b/apps/shared/store_controller.cpp @@ -272,7 +272,8 @@ void StoreController::unloadView(View * view) { bool StoreController::privateFillColumnWithFormula(Expression * formula, Expression::isVariableTest isVariable) { int currentColumn = selectedColumn(); // Fetch the series used in the formula to compute the size of the filled in series - char variables[7] = {0, 0, 0, 0, 0, 0, 0}; + char variables[Expression::k_maxNumberOfVariables]; + variables[0] = 0; formula->getVariables(isVariable, variables); int numberOfValuesToCompute = -1; int index = 0;