diff options
author | tradke <tradke@17b73243-c579-4c4c-a9d2-2d5706c11dac> | 2001-04-17 11:59:06 +0000 |
---|---|---|
committer | tradke <tradke@17b73243-c579-4c4c-a9d2-2d5706c11dac> | 2001-04-17 11:59:06 +0000 |
commit | c968f30b0fc866d0e18472e908b50f6c35e8c7bd (patch) | |
tree | fb20883827697c629090fed2f370b82a149c2c5a | |
parent | 5410b88d3fe55ccd884df4103eda672693d98768 (diff) |
Escape all backslashes in parameter ranges so that they aren't treated
as the beginning of an escape sequence in C strings.
This closes PR Cactus-606.
git-svn-id: http://svn.cactuscode.org/flesh/trunk@2118 17b73243-c579-4c4c-a9d2-2d5706c11dac
-rw-r--r-- | lib/sbin/CreateParameterBindings.pl | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/sbin/CreateParameterBindings.pl b/lib/sbin/CreateParameterBindings.pl index ad67ea78..e371d83d 100644 --- a/lib/sbin/CreateParameterBindings.pl +++ b/lib/sbin/CreateParameterBindings.pl @@ -656,6 +656,10 @@ sub CreateParameterRegistrationStuff $quoted_range =~ s:^\s*::; $quoted_range =~ s:\s*$::; + # escape all backslashes so that they aren't treated + # as the beginning of an escape sequence in C strings + $quoted_range =~ s:\\:\\\\:g; + $line .= ",\n \"".$quoted_range."\", $range_description"; } |