diff --git a/ChangeLog b/ChangeLog index 37571a0ee..5db4c41f0 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +2009-11-21 Holger Vogt + * spicelib/parser/inptree.c: memory allocation of struct pwldata->vals + failed in MS Visual Studio 2008, changed. + 2009-11-20 Holger Vogt * postsc.c: some cosmetics to postscript plot, hcopypstxcolor for setting text color diff --git a/src/spicelib/parser/inpptree.c b/src/spicelib/parser/inpptree.c index 39eb44572..3991c2472 100644 --- a/src/spicelib/parser/inpptree.c +++ b/src/spicelib/parser/inpptree.c @@ -797,8 +797,8 @@ static INPparseNode *prepare_PTF_PWL(INPparseNode *p) return (NULL); } - data = (struct pwldata *) - MALLOC(sizeof(struct pwldata) + i*sizeof(double)); + data = (struct pwldata *) MALLOC(sizeof(struct pwldata)); + data->vals = (double*) MALLOC(i*sizeof(double)); data->n = i;