diff options
author | tradke <tradke@ebee0441-1374-4afa-a3b5-247f3ba15b9a> | 2000-01-17 14:41:43 +0000 |
---|---|---|
committer | tradke <tradke@ebee0441-1374-4afa-a3b5-247f3ba15b9a> | 2000-01-17 14:41:43 +0000 |
commit | 3d18b63118b9667691b3cf0fc6eb2f5b81d10a6c (patch) | |
tree | 7281f5bc6adb42bdff42f25e555b9f7575193f23 | |
parent | 3007a15d366242c1e200fb42e1d86d7c5df73a52 (diff) |
Copying the "outdir" value as full string to myGH->outdirXXX
instead of just assigning it the pointer to the global variable.
This fixes the bug where the pointer value got invalid after resetting
the "outdir" parameter (eg. during recovery).
git-svn-id: http://svn.cactuscode.org/arrangements/CactusPUGHIO/IOFlexIO/trunk@72 ebee0441-1374-4afa-a3b5-247f3ba15b9a
-rw-r--r-- | src/GHExtension.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/GHExtension.c b/src/GHExtension.c index 3917604..0633017 100644 --- a/src/GHExtension.c +++ b/src/GHExtension.c @@ -83,15 +83,15 @@ int IOFlexIO_InitGH (cGH *GH) If so take these dirs otherwise default to "IO::outdir" */ param_prop = CCTK_ParameterInfo ("outdir2D", CCTK_THORNSTRING); if (param_prop && param_prop->n_set > 0) - myGH->outdir2D = outdir2D; + myGH->outdir2D = strdup (outdir2D); else - myGH->outdir2D = outdir; + myGH->outdir2D = strdup (outdir); param_prop = CCTK_ParameterInfo ("outdir3D", CCTK_THORNSTRING); if (param_prop && param_prop->n_set > 0) - myGH->outdir3D = outdir3D; + myGH->outdir3D = strdup (outdir3D); else - myGH->outdir3D = outdir; + myGH->outdir3D = strdup (outdir); /* Create the output directories */ if (CCTK_MyProc (GH) == 0) { |