diff --git a/ChangeLog b/ChangeLog index 553e1e7a0..d41f7821f 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2011-02-13 Robert Larice + * src/frontend/numparam/spicenum.c , + * src/frontend/numparam/xpressn.c : + reinstate a missing if(numerical), which got lost + and fix a few comments + 2011-02-13 Robert Larice part 2, the actual change diff --git a/src/frontend/numparam/spicenum.c b/src/frontend/numparam/spicenum.c index e84b25343..d4e30a027 100644 --- a/src/frontend/numparam/spicenum.c +++ b/src/frontend/numparam/spicenum.c @@ -60,7 +60,7 @@ extern int dynmaxline; /* inpcom.c:1529 */ overwrite any line pointers, or we start a new set after each sig=0 ? Anyway, we neutralize all & and .param lines (category[] array!) and we substitute all {} &() and &id placeholders by dummy numbers. - The placeholders are long long integers 100000000000000+n (17 digits, n small). + The placeholders are long long integers 10000000000000000+n (17 digits, n small). */ /********** string handling ***********/ diff --git a/src/frontend/numparam/xpressn.c b/src/frontend/numparam/xpressn.c index 5e1d492f4..2fa35656c 100644 --- a/src/frontend/numparam/xpressn.c +++ b/src/frontend/numparam/xpressn.c @@ -1555,9 +1555,14 @@ evaluate (tdico * dico, SPICE_DSTRINGPTR qstr_p, char *t, unsigned char mode) u = formula (dico, t, &err); numeric = 1; } - /* set string to total length 17, mantissa after . is of length 9 - use sprintf with format string %17.10g */ - strf (u, 17, 10, qstr_p); + + if (numeric) + { + /* set string to total length 17, mantissa after . is of length 9 + use sprintf with format string %17.10g */ + strf (u, 17, 10, qstr_p); + } + spice_dstring_free(&vstr) ; return err; } @@ -1857,7 +1862,7 @@ insertnumber (tdico * dico, int i, char *s, SPICE_DSTRINGPTR ustr_p) while (found && (k < 17)) { - /* parse a 15-digit number */ + /* parse a 17-digit number */ found = num (s[i + k]); if (found)