diff options
author | tradke <tradke@b589c3ab-70e8-4b4d-a09f-cba2dd200880> | 2000-01-17 14:41:42 +0000 |
---|---|---|
committer | tradke <tradke@b589c3ab-70e8-4b4d-a09f-cba2dd200880> | 2000-01-17 14:41:42 +0000 |
commit | 80789c18045b6fed18a031a2307d871ed332eb4e (patch) | |
tree | a866af28b15df802141112652f6d9ec504219f0d | |
parent | 5031a0920284d36b6b324ba334d8a1d8fd2785b4 (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/CactusBase/IOBasic/trunk@22 b589c3ab-70e8-4b4d-a09f-cba2dd200880
-rw-r--r-- | src/GHExtension.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/GHExtension.c b/src/GHExtension.c index 3113866..901028c 100644 --- a/src/GHExtension.c +++ b/src/GHExtension.c @@ -66,9 +66,9 @@ int IOBasic_InitGH (cGH *GH) If so take this dir otherwise default to "IO::outdir" */ param_prop = CCTK_ParameterInfo ("outdirScalar", CCTK_THORNSTRING); if (param_prop && param_prop->n_set > 0) - myGH->outdirScalar = outdirScalar; + myGH->outdirScalar = strdup (outdirScalar); else - myGH->outdirScalar = outdir; + myGH->outdirScalar = strdup (outdir); /* create the output dir */ if (CCTK_MyProc (GH) == 0) |