From 88e94b26c4d8d3ede31b47251f3a0369069f11fb Mon Sep 17 00:00:00 2001 From: Holger Vogt Date: Wed, 3 Jun 2026 16:40:45 +0200 Subject: [PATCH] Reset ckt->CKTag[0] and ckt->CKTag[1] upon successful return from transient simulation. --- src/spicelib/analysis/dcpss.c | 1 + src/spicelib/analysis/dctran.c | 2 ++ src/spicelib/analysis/optran.c | 1 + 3 files changed, 4 insertions(+) diff --git a/src/spicelib/analysis/dcpss.c b/src/spicelib/analysis/dcpss.c index aa0cee3c8..6bd998f5a 100644 --- a/src/spicelib/analysis/dcpss.c +++ b/src/spicelib/analysis/dcpss.c @@ -1015,6 +1015,7 @@ shootingexit: FREE (err_conv) ; FREE (psstimes) ; FREE (pssvalues) ; + ckt->CKTag[0] = ckt->CKTag[1] = 0.; return (OK) ; } } diff --git a/src/spicelib/analysis/dctran.c b/src/spicelib/analysis/dctran.c index ff203a082..083986231 100644 --- a/src/spicelib/analysis/dctran.c +++ b/src/spicelib/analysis/dctran.c @@ -449,6 +449,7 @@ DCtran(CKTcircuit *ckt, fprintf(stdout, "\nNote: Autostop after %e s, all measurement conditions are fulfilled.\n", ckt->CKTtime); /* Final return from tran upon success */ + ckt->CKTag[0] = ckt->CKTag[1] = 0.; return(OK); } if(SPfrontEnd->IFpauseTest()) { @@ -907,6 +908,7 @@ resume: SPfrontEnd->OUTendPlot(job->TRANplot); job->TRANplot = NULL; UPDATE_STATS(0); + ckt->CKTag[0] = ckt->CKTag[1] = 0.; /* return upon convergence failure */ return(E_TIMESTEP); } diff --git a/src/spicelib/analysis/optran.c b/src/spicelib/analysis/optran.c index 86dceab55..6f12dd6d3 100644 --- a/src/spicelib/analysis/optran.c +++ b/src/spicelib/analysis/optran.c @@ -484,6 +484,7 @@ OPtran(CKTcircuit *ckt, int oldconverged) SPfrontEnd->IFerrorf(ERR_INFO, "Transient op finished successfully"); ckt->CKTmaxStep = prevmaxstepsize; ckt->CKTstep = prevstepsize; + ckt->CKTag[0] = ckt->CKTag[1] = 0.; return(OK); }