summaryrefslogtreecommitdiff
path: root/lib/sbin/create_c_stuff.pl
diff options
context:
space:
mode:
Diffstat (limited to 'lib/sbin/create_c_stuff.pl')
-rw-r--r--lib/sbin/create_c_stuff.pl4
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/sbin/create_c_stuff.pl b/lib/sbin/create_c_stuff.pl
index 70373dcd..27311f86 100644
--- a/lib/sbin/create_c_stuff.pl
+++ b/lib/sbin/create_c_stuff.pl
@@ -243,9 +243,11 @@ sub set_parameter_default
{
# Logicals need to be done specially.
- # Strip out any quote marks.
+ # Strip out any quote marks, and spaces at start and end.
$temp_default = $default;
$temp_default =~ s:\"::g;
+ $temp_default =~ s:\s*$:: ;
+ $temp_default =~ s:^\s*:: ;
$line = " CCTK_SetLogical(\&($structure.$parameter),\"$temp_default\");";
push(@lines, $line);