From 514c8e857340c115bd1845c5074604e3923183c4 Mon Sep 17 00:00:00 2001 From: h_vogt Date: Sat, 21 Nov 2009 22:21:14 +0000 Subject: [PATCH] memory allocation struct pwldata->vals --- ChangeLog | 4 ++++ src/spicelib/parser/inpptree.c | 4 ++-- 2 files changed, 6 insertions(+), 2 deletions(-) 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;