aboutsummaryrefslogtreecommitdiff
path: root/src/NewHyperslab.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/NewHyperslab.c')
-rw-r--r--src/NewHyperslab.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/NewHyperslab.c b/src/NewHyperslab.c
index 1922c41..7e86a21 100644
--- a/src/NewHyperslab.c
+++ b/src/NewHyperslab.c
@@ -441,7 +441,8 @@ int NewHyperslab_GetLocalHyperslab (cGH *GH, int vindex, int vtimelvl,
hdata_size = CCTK_VarTypeSize (htype);
/* allocate the buffer for the hyperslab data */
- typed_hdata = (char *) *hdata = malloc (totals * hdata_size);
+ *hdata = malloc (totals * hdata_size);
+ typed_hdata = (char *) (*hdata);
/* get the number of hyperslab points in lowest dimension,
their size in bytes,