From 3d18b63118b9667691b3cf0fc6eb2f5b81d10a6c Mon Sep 17 00:00:00 2001 From: tradke Date: Mon, 17 Jan 2000 14:41:43 +0000 Subject: 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 --- src/GHExtension.c | 8 ++++---- 1 file 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) { -- cgit v1.2.3