[poincare/function] Fix getVariables

Faulty scenario:
Equation x+y=f(0) without defining any variable
This commit is contained in:
Léa Saviot
2020-02-20 11:38:02 +01:00
committed by EmilieNumworks
parent 0d8cb0123b
commit 80c03220dd

View File

@@ -39,7 +39,7 @@ int FunctionNode::getVariables(Context * context, isVariableTest isVariable, cha
Function f(this);
Expression e = SymbolAbstract::Expand(f, context, true);
if (e.isUninitialized()) {
return 0;
return nextVariableIndex;
}
return e.node()->getVariables(context, isVariable, variables, maxSizeVariable, nextVariableIndex);
}