Fix out-of-bounds access if no iteration performed
This commit is contained in:
parent
bf2400fd98
commit
36472346f8
4
main.c
4
main.c
@ -247,7 +247,7 @@ void printStatistics()
|
||||
if(flagOutputDIMACS == 0) {
|
||||
printf("iterations:\n");
|
||||
int i = 0;
|
||||
do {
|
||||
while(i*outputTimeStep+firstTimePoint < lastTimePoint && seqs[i].sati) {
|
||||
printf(" - horizon: %i\n",seqs[i].sati->nOfTPoints-1);
|
||||
printf(" result: ");
|
||||
if (seqs[i].sati->value == 0)
|
||||
@ -261,7 +261,7 @@ void printStatistics()
|
||||
printf(" decisions: %i\n",seqs[i].sati->decisions);
|
||||
printf(" variables: %i\n",seqs[i].sati->nOfVars);
|
||||
i += 1;
|
||||
} while(i*outputTimeStep+firstTimePoint <= lastTimePoint && seqs[i].sati);// && seqs[i-1].sati->value != 1);
|
||||
}// && seqs[i-1].sati->value != 1);
|
||||
// } while(i*outputTimeStep+firstTimePoint < lastTimePoint);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user