Browse Source

Applied patch from Richard McRoberts: A bug that most users probably wouldn't

encounter occurs in an ac analysis using a linear sweep with only one point.
A rather pathological case.) The original code in acan.c uses a frequency
ncrement of "HUGE" (infinity) which causes a crash when stepping to the second
point. Fixed by making the increment zero, which is tested for in the sweep,
ausing it to terminate correctly after the first point.
pre-master-46
pnenzi 25 years ago
parent
commit
4baa8b0dcf
  1. 5
      src/spicelib/analysis/acan.c

5
src/spicelib/analysis/acan.c

@ -54,7 +54,10 @@ ACan(CKTcircuit *ckt, int restart)
((ACAN*)ckt->CKTcurJob)->ACstartFreq)/
(((ACAN*)ckt->CKTcurJob)->ACnumberSteps-1);
else
((ACAN*)ckt->CKTcurJob)->ACfreqDelta = HUGE;
/* Patch from: Richard McRoberts
* This patch is for a rather pathological case:
* a linear step with only one point */
((ACAN*)ckt->CKTcurJob)->ACfreqDelta = 0;
break;
default:
return(E_BADPARM);

Loading…
Cancel
Save