aboutsummaryrefslogtreecommitdiff
path: root/src/TP_utilities.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/TP_utilities.c')
-rw-r--r--src/TP_utilities.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/TP_utilities.c b/src/TP_utilities.c
index f883a78..cca944d 100644
--- a/src/TP_utilities.c
+++ b/src/TP_utilities.c
@@ -112,7 +112,7 @@ d3tensor (long nrl, long nrh, long ncl, long nch, long ndl, long ndh)
CCTK_WARN (CCTK_WARN_ABORT, "allocation failure (2) in dmatrix()");
/* get all memory for the tensor in on chunk */
- retval[0][0] = malloc(sizeof(CCTK_REAL)*(nrh-nrl+1)*(nch-ncl+1)*(nrh-nrl+1));
+ retval[0][0] = malloc(sizeof(CCTK_REAL)*(nrh-nrl+1)*(nch-ncl+1)*(ndh-ndl+1));
if(retval[0][0] == NULL)
CCTK_WARN (CCTK_WARN_ABORT, "allocation failure (3) in dmatrix()");