diff options
author | tradke <tradke@94b1c47f-dcfd-45ef-a468-0854c0e9e350> | 2004-06-15 08:41:31 +0000 |
---|---|---|
committer | tradke <tradke@94b1c47f-dcfd-45ef-a468-0854c0e9e350> | 2004-06-15 08:41:31 +0000 |
commit | a1866295732a3302b5f11cdca2f880b271ca30ba (patch) | |
tree | e6a77a164f6dc6e217325af4b88b00938e5ba41f | |
parent | 530360d6676476972d14f3134d85d38f4404cb75 (diff) |
Initialize the extent_int[] array before it is being used !
This closes PR CactusBase/1770: "IOAscii 3D output no longer works".
git-svn-id: http://svn.cactuscode.org/arrangements/CactusBase/IOASCII/trunk@184 94b1c47f-dcfd-45ef-a468-0854c0e9e350
-rw-r--r-- | src/Write3D.c | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/src/Write3D.c b/src/Write3D.c index 4a6bab7..9664e41 100644 --- a/src/Write3D.c +++ b/src/Write3D.c @@ -210,9 +210,12 @@ int IOASCII_Write3D (const cGH *GH, int vindex, const char *alias) file = myproc == 0 ? OpenFile (GH, fullname, alias) : NULL; /* get the total number of grid points to check for zero-sized variables */ - for (i = 0, total_hsize = 1; i < gdata.dim; i++) + /* set the extent vector (copy from 'int' to 'CCTK_INT' */ + CCTK_GroupgshVI (GH, 3, extent_int, vindex); + for (i = 0, total_hsize = 1; i < 3; i++) { total_hsize *= extent_int[i]; + extent[i] = extent_int[i]; } if (total_hsize <= 0) { @@ -220,13 +223,6 @@ int IOASCII_Write3D (const cGH *GH, int vindex, const char *alias) return (0); } - /* set the extent vector (copy from 'int' to 'CCTK_INT' */ - CCTK_GroupgshVI (GH, 3, extent_int, vindex); - for (i = 0; i < 3; i++) - { - extent[i] = extent_int[i]; - } - downsample[0] = out_downsample_x; downsample[1] = out_downsample_y; downsample[2] = out_downsample_z; |