aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorrhaas <rhaas@b2a53a04-0f4f-0410-87ed-f9f25ced00cf>2013-10-23 16:00:15 +0000
committerrhaas <rhaas@b2a53a04-0f4f-0410-87ed-f9f25ced00cf>2013-10-23 16:00:15 +0000
commit72d3fc1eebae676d0af1f6bd1b122a32b0299ab7 (patch)
treee5e90ddde3ed8e7dfe925bf845c8f9c1bdf22c47
parent9b5807c9d268325a71a15475182326caab9d9127 (diff)
correct amount of memory allocated in d3tensor
had mixed up depth and length before git-svn-id: http://svn.einsteintoolkit.org/cactus/EinsteinInitialData/TwoPunctures/trunk@135 b2a53a04-0f4f-0410-87ed-f9f25ced00cf
-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()");