diff options
author | goodale <goodale@17b73243-c579-4c4c-a9d2-2d5706c11dac> | 1999-09-14 09:10:28 +0000 |
---|---|---|
committer | goodale <goodale@17b73243-c579-4c4c-a9d2-2d5706c11dac> | 1999-09-14 09:10:28 +0000 |
commit | f755d17593582c0cc1d0aff73045b1bb23cbf4d1 (patch) | |
tree | 9ff16162ddd83f29a3e814fb1365ac3c946ea204 /src/main/SetParams.c | |
parent | 034bea519a90439fcab0b0b2fd6db3aa80560a20 (diff) |
Won't set a parameter from an inactive thorn, see PR CCTK/77.
Removed some tabs from the source file.
Tom
git-svn-id: http://svn.cactuscode.org/flesh/trunk@902 17b73243-c579-4c4c-a9d2-2d5706c11dac
Diffstat (limited to 'src/main/SetParams.c')
-rw-r--r-- | src/main/SetParams.c | 21 |
1 files changed, 14 insertions, 7 deletions
diff --git a/src/main/SetParams.c b/src/main/SetParams.c index 13822483..a2b0e424 100644 --- a/src/main/SetParams.c +++ b/src/main/SetParams.c @@ -1,4 +1,4 @@ - /*@@ +/*@@ @file SetParams.c @date Tue Jan 12 19:16:38 1999 @author Tom Goodale @@ -63,14 +63,14 @@ int CCTKi_SetParameter(const char *parameter, const char *value) for(;*position && *position != ' ';position++) { - thornname[length] = *position; - if(length < 100) length++; + thornname[length] = *position; + if(length < 100) length++; } if (length > 0) { - thornname[length] = '\0'; - n_errors += CCTKi_ActivateThorn(thornname) != 0; + thornname[length] = '\0'; + n_errors += CCTKi_ActivateThorn(thornname) != 0; } if(*position) position++; @@ -114,7 +114,7 @@ int CCTKi_ReallySetParameter(const char *parameter, const char *value) /* - CCTKi_BindingsParameterHelp(optarg,"%s",stdout); + CCTKi_BindingsParameterHelp(optarg,"%s",stdout); */ Util_SplitString(&imp, ¶m, parameter, "::"); @@ -144,7 +144,14 @@ int CCTKi_ReallySetParameter(const char *parameter, const char *value) /* Set if this is a thorn one. */ if(!thorn || !CCTK_Equals(thorn,imp)) { - retval_thorn = ParameterSet(param, imp, value); + if(CCTK_IsThornActive(imp)) + { + retval_thorn = ParameterSet(param, imp, value); + } + else + { + retval_thorn = -1; + } } else { |