aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authortradke <tradke@94b1c47f-dcfd-45ef-a468-0854c0e9e350>2002-02-28 11:55:23 +0000
committertradke <tradke@94b1c47f-dcfd-45ef-a468-0854c0e9e350>2002-02-28 11:55:23 +0000
commit621be50468122ec443905f9d620f17b15f25b24b (patch)
tree63174f03cab49d0c5532bd538bc4c4cf4b044bf1 /src
parent779dda778a0e58d61659f15b4cfd1edcced6e4d1 (diff)
Fix for when there are no coordinates registered.
git-svn-id: http://svn.cactuscode.org/arrangements/CactusBase/IOASCII/trunk@101 94b1c47f-dcfd-45ef-a468-0854c0e9e350
Diffstat (limited to 'src')
-rw-r--r--src/Write1D.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/Write1D.c b/src/Write1D.c
index a6f22f5..0cc13fa 100644
--- a/src/Write1D.c
+++ b/src/Write1D.c
@@ -610,9 +610,12 @@ int IOASCII_Write1D (const cGH *GH, int vindex, const char *alias)
if (dir < 3)
{
/* get the staggering offset for the xyz coordinates */
- offset = CCTK_StaggerDirIndex (dir, group_static_data.stagtype) *
- 0.5 * GH->cctk_delta_space[dir];
- if (! have_coords)
+ offset = 0.5 * CCTK_StaggerDirIndex (dir, group_static_data.stagtype);
+ if (have_coords)
+ {
+ offset *= GH->cctk_delta_space[dir];
+ }
+ else
{
coord_data = (CCTK_REAL *) malloc (hsize * sizeof (CCTK_REAL));
for (i = 0; i < hsize; i++)