swload.c: reinstate the truncation code from swtrunc.c

which was removed in the following commit:

commit 0dae4607a0
Date:   Wed Apr 25 18:28:20 2001 +0000

    Added a patch to csw and sw from Jon Engelbert dealing with negative histeresys
This commit is contained in:
h_vogt 2013-04-22 22:44:58 +02:00 committed by rlar
parent 8ac5f64500
commit 89c4c16829
1 changed files with 1 additions and 0 deletions

View File

@ -138,6 +138,7 @@ SWload(GENmodel *inModel, CKTcircuit *ckt)
// After analyzing the transient code, it seems that this is not a problem because state updating
// occurs before the convergence loop in transient processing.
*(ckt->CKTstates[0] + here->SWstate) = current_state;
*(ckt->CKTstates[0] + here->SWstate + 1) = v_ctrl;
if ((current_state == REALLY_ON) || (current_state == HYST_ON))
g_now = model->SWonConduct;