From 05ef7008dcf0aac87aa9bb6c8f2827cedc1b649a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89milie=20Feral?= Date: Sat, 22 Dec 2018 10:25:33 +0100 Subject: [PATCH] [solver] Fix bug: when the number of solutions is infinite, do not try to find the solution layouts --- apps/solver/equation_store.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/solver/equation_store.cpp b/apps/solver/equation_store.cpp index b7b444985..2b1ac89af 100644 --- a/apps/solver/equation_store.cpp +++ b/apps/solver/equation_store.cpp @@ -174,7 +174,7 @@ EquationStore::Error EquationStore::exactSolve(Poincare::Context * context) { } /* Turn the results in layouts */ int solutionIndex = 0; - int initialNumberOfSolutions = m_numberOfSolutions; + int initialNumberOfSolutions = m_numberOfSolutions <= k_maxNumberOfExactSolutions ? m_numberOfSolutions : -1; // We iterate through the solutions and the potential delta for (int i = 0; i < initialNumberOfSolutions+1; i++) { if (!exactSolutions[i].isUninitialized()) {