From aeb1019dcdc314b42ba3cdddd87705dc861c6ddd Mon Sep 17 00:00:00 2001 From: tradke Date: Mon, 29 Sep 2003 19:14:02 +0000 Subject: Check for valid input and output array datatype. This closes CactusBase/1606: Wrong error message in LocalInterp. git-svn-id: http://svn.cactuscode.org/arrangements/CactusBase/LocalInterp/trunk@177 df1f8a13-aa1d-4dd4-9681-27ded5b42416 --- src/Interpolate.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/Interpolate.c b/src/Interpolate.c index 9bf6267..024ee58 100644 --- a/src/Interpolate.c +++ b/src/Interpolate.c @@ -547,6 +547,15 @@ if (n == LocalInterp_verbose_debug_n) /* now loop over all arrays to interpolate at the current point */ for (a = 0; a < num_arrays; a++) { + /* check for valid input and output array type */ + if (in_types[a] < 0 || out_types[a] < 0) + { + CCTK_VWarn (1, __LINE__, __FILE__, CCTK_THORNSTRING, + "Datatype for input and/or output array with index %d " + "is invalid", a); + continue; + } + /* sorry, for now input and output arrays must be of same type */ if (in_types[a] != out_types[a]) { -- cgit v1.2.3