From 4baa8b0dcf8ab8db370622ee619ee0e89b014ba4 Mon Sep 17 00:00:00 2001 From: pnenzi Date: Sun, 25 Nov 2001 18:28:20 +0000 Subject: [PATCH] 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. --- src/spicelib/analysis/acan.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/spicelib/analysis/acan.c b/src/spicelib/analysis/acan.c index d7da5bab6..bcaa5113b 100644 --- a/src/spicelib/analysis/acan.c +++ b/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);