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.
This commit is contained in:
pnenzi 2001-11-25 18:28:20 +00:00
parent c6d2a20b8f
commit 4baa8b0dcf
1 changed files with 4 additions and 1 deletions

View File

@ -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);