diff --git a/ChangeLog b/ChangeLog index 8aa94ffc4..633759e0f 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +2010-04-26 Dietmar Warning + * parser/inpgval.c: correct parsing of integer model parameter given as double + (e.g. capmod=3.000e+00) + 2010-04-23 Holger Vogt * xpressn.c: agauss is no. 20 main.c, inp.c, inpcom.c, compatmode.h, inpptree.h, ifeval.c, inpptree.c, ptfuncs.c: diff --git a/src/spicelib/parser/inpgval.c b/src/spicelib/parser/inpgval.c index 4f043cb44..0cb017f06 100644 --- a/src/spicelib/parser/inpgval.c +++ b/src/spicelib/parser/inpgval.c @@ -23,7 +23,8 @@ IFvalue *INPgetValue(void *ckt, char **line, int type, INPtables * tab) /* make sure we get rid of extra bits in type */ type &= IF_VARTYPES; if (type == IF_INTEGER) { - temp.iValue = INPevaluate(line, &error, 1); + tmp = INPevaluate(line, &error, 1); + temp.iValue = (int) floor(0.5 + tmp); /*printf(" returning integer value %d\n",temp.iValue); */ } else if (type == IF_REAL) { temp.rValue = INPevaluate(line, &error, 1);