From e1bda92b323dc19150290ec883e4e2e5b259628c Mon Sep 17 00:00:00 2001 From: jthorn Date: Mon, 4 Aug 2003 09:19:17 +0000 Subject: 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 --- src/Startup.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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 */ -- cgit v1.2.3