diff options
author | Keith Kanios <keith@kanios.net> | 2010-08-01 20:49:57 -0500 |
---|---|---|
committer | Keith Kanios <keith@kanios.net> | 2010-08-01 20:49:57 -0500 |
commit | ab8573a185dce33c1e31259b1b828668585ad1d2 (patch) | |
tree | cc911c4cd86c9660b8a8ba1d4c236f385a8daece | |
parent | 091cce678e31abb7ab393d98a3e0f64f4865a9c7 (diff) | |
download | nasm-ab8573a185dce33c1e31259b1b828668585ad1d2.tar.gz |
macros.pl: added single-quote sanitizer to charcify subroutine, thanks Bryant Keller
-rwxr-xr-x | macros.pl | 2 |
1 files changed, 2 insertions, 0 deletions
@@ -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 # |