Browse Source

prevent crash if first breakpoint is beyond optran max time

pre-master-46
Holger Vogt 6 years ago
parent
commit
bca099ca29
  1. 2
      src/spicelib/analysis/cktsetbk.c

2
src/spicelib/analysis/cktsetbk.c

@ -73,7 +73,7 @@ CKTsetBreak(CKTcircuit *ckt, double time)
} }
} }
/* never found it - beyond end of time - extend out idea of time */ /* never found it - beyond end of time - extend out idea of time */
if(time-ckt->CKTbreaks[ckt->CKTbreakSize-1]<=ckt->CKTminBreak) {
if(ckt->CKTbreaks && time-ckt->CKTbreaks[ckt->CKTbreakSize-1]<=ckt->CKTminBreak) {
/* very close tegether - keep earlier, throw out new point */ /* very close tegether - keep earlier, throw out new point */
#ifdef TRACE_BREAKPOINT #ifdef TRACE_BREAKPOINT
printf("[t:%e] \t %e skipped (at the end)\n", ckt->CKTtime, time); printf("[t:%e] \t %e skipped (at the end)\n", ckt->CKTtime, time);

Loading…
Cancel
Save