summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xmacros.pl2
1 files changed, 2 insertions, 0 deletions
diff --git a/macros.pl b/macros.pl
index 911da8db..14524ec8 100755
--- a/macros.pl
+++ b/macros.pl
@@ -57,12 +57,14 @@ sub charcify(@) {
if ($o < 32 || $o > 126 || $c eq '"' || $c eq "\\") {
$l .= sprintf("%3d,", $o);
} else {
+ $c =~ s/\'/\\'/; # << sanitize single quote.
$l .= "\'".$c."\',";
}
}
return $l;
}
+
#
# Generate macros.c
#