[Sequences] Fixed a few crashes

Change-Id: Ib929bbae0f9ca06409706336ff799075e1288694
This commit is contained in:
Arthur Camouseigt
2020-09-17 11:43:27 +02:00
committed by Émilie Feral
parent 26bbdead7d
commit 960335c330
7 changed files with 60 additions and 16 deletions

View File

@@ -127,7 +127,7 @@ const Expression GlobalContext::ExpressionForSequence(const SymbolAbstract & sym
char unknownN[bufferSize];
Poincare::SerializationHelper::CodePoint(unknownN, bufferSize, UCodePointUnknown);
float rank = symbol.childAtIndex(0).approximateWithValueForSymbol<float>(unknownN, unknownSymbolValue, ctx, Preferences::sharedPreferences()->complexFormat(),Preferences::sharedPreferences()->angleUnit());
if (std::floor(rank) == rank && seq.hasValidExpression()) {
if (std::floor(rank) == rank) {
SequenceContext sqctx(ctx, sequenceStore());
return Float<double>::Builder(seq.evaluateXYAtParameter(rank, &sqctx).x2());
} else {