aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjthorn <jthorn@df1f8a13-aa1d-4dd4-9681-27ded5b42416>2003-08-04 09:19:17 +0000
committerjthorn <jthorn@df1f8a13-aa1d-4dd4-9681-27ded5b42416>2003-08-04 09:19:17 +0000
commite1bda92b323dc19150290ec883e4e2e5b259628c (patch)
treeb67497e1a717cefc85796dfce72e51589ba92bb1
parent1bbb51e1eb07986f2eb6fad44ada52a4151c1201 (diff)
fix a nasty bug due to bad pointer/array indexing :( :(
-- thanks to Frank Herrmann for spotting this! git-svn-id: http://svn.cactuscode.org/arrangements/CactusBase/LocalInterp/trunk@172 df1f8a13-aa1d-4dd4-9681-27ded5b42416
-rw-r--r--src/Startup.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/Startup.c b/src/Startup.c
index c8277f6..58807cd 100644
--- a/src/Startup.c
+++ b/src/Startup.c
@@ -234,6 +234,7 @@ static int InterpLocal_NthOrder (cGH *GH,
CCTK_INT *_coord_dims, *_in_array_types, *_out_array_types;
CCTK_REAL *origin, *delta;
char string[32];
+ CCTK_REAL origin1;
/* no information needed from the GH */
@@ -276,7 +277,8 @@ static int InterpLocal_NthOrder (cGH *GH,
for (i = 0; i < num_dims; i++)
{
origin[i] = ((const CCTK_REAL *const *) coord_arrays)[i][0];
- delta[i] = origin[i+1] - origin[i];
+ origin1 = ((const CCTK_REAL *const *) coord_arrays)[i][1];
+ delta[i] = origin1 - origin[i];
}
/* create a table with the interpolation order information */