[Sequence] Fixed computation error and asan fails

Change-Id: Ib3a619d29bee5cc6f10b939ee066459a5b135c5d
This commit is contained in:
Arthur Camouseigt
2020-10-01 16:18:39 +02:00
committed by Émilie Feral
parent 86d0c19293
commit bf95b460c3
6 changed files with 18 additions and 8 deletions

View File

@@ -33,7 +33,7 @@ const Expression SequenceCacheContext<T>::expressionForSymbolAbstract(const Poin
Ion::Storage::Record record = m_sequenceContext->sequenceStore()->recordAtIndex(index);
if (!record.isNull()) {
Sequence * seq = m_sequenceContext->sequenceStore()->modelForRecord(record);
rank.replaceSymbolWithExpression(Symbol::Builder(UCodePointUnknown), Float<T>::Builder(m_nValue));
rank.replaceSymbolWithExpression(Symbol::Builder(UCodePointUnknown), Float<T>::Builder(unknownSymbolValue));
T n = PoincareHelpers::ApproximateToScalar<T>(rank, this);
// In case the sequence referenced is not defined or if the rank is not an int, return NAN
if (seq->fullName() != nullptr) {