aboutsummaryrefslogtreecommitdiff
path: root/src/Storage.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/Storage.c')
-rw-r--r--src/Storage.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/Storage.c b/src/Storage.c
index edcc2ec..3ae2428 100644
--- a/src/Storage.c
+++ b/src/Storage.c
@@ -690,7 +690,7 @@ static int PUGH_EnableGArrayGroupStorage (pGH *pughGH,
else if (! padding_active)
{
/* Easy case. */
- GA->data = malloc (GA->extras->npoints * GA->varsize);
+ GA->data = malloc (GA->extras->npoints * GA->varsize * GA->vector_size);
GA->padddata = GA->data;
}
else
@@ -710,10 +710,10 @@ static int PUGH_EnableGArrayGroupStorage (pGH *pughGH,
if (GA->data)
{
PUGH_InitializeMemory (initialize_memory, GA->vtype,
- GA->extras->npoints * GA->varsize, GA->data);
+ GA->extras->npoints * GA->varsize * GA->vector_size, GA->data);
}
- if (GA->extras->npoints * GA->varsize > 0 && GA->padddata == NULL)
+ if (GA->extras->npoints * GA->varsize * GA->vector_size > 0 && GA->padddata == NULL)
{
CCTK_VWarn (0, __LINE__, __FILE__, CCTK_THORNSTRING,
"PUGH_EnableGArrayDataStorage: Cannot allocate data for "