From: nasm-bot f. K. K. <ke...@ka...> - 2010-08-02 19:12:25
|
Commit-ID: ab8573a185dce33c1e31259b1b828668585ad1d2 Gitweb: http://repo.or.cz/w/nasm.git?a=commitdiff;h=ab8573a185dce33c1e31259b1b828668585ad1d2 Author: Keith Kanios <ke...@ka...> AuthorDate: Sun, 1 Aug 2010 20:49:57 -0500 Committer: Keith Kanios <ke...@ka...> CommitDate: Sun, 1 Aug 2010 20:49:57 -0500 macros.pl: added single-quote sanitizer to charcify subroutine, thanks Bryant Keller --- macros.pl | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) diff --git a/macros.pl b/macros.pl index 911da8d..14524ec 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 # |