mirror of
https://github.com/UpsilonNumworks/Upsilon.git
synced 2026-01-19 00:37:25 +01:00
[apps/shared] Prevent Array index overflow
Change-Id: I67ffcb71d0d62a3e67e6d63d2b30b0696800cb42
This commit is contained in:
committed by
Émilie Feral
parent
fe950386a0
commit
8dc6391e92
@@ -233,7 +233,7 @@ T Sequence::approximateToNextRank(int n, SequenceContext * sqctx, int sequenceIn
|
||||
int offset = independentRank - sqctx->independentSequenceRank<T>(i);
|
||||
if (offset != 0) {
|
||||
for (int j = MaxRecurrenceDepth; j >= 0; j--) {
|
||||
values[i][j] = j-offset < 0 ? NAN : sqctx->independentSequenceValue<T>(i, j-offset);
|
||||
values[i][j] = j-offset < 0 || j-offset > MaxRecurrenceDepth ? NAN : sqctx->independentSequenceValue<T>(i, j-offset);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user