summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorH. Peter Anvin (Intel) <hpa@zytor.com>2019-08-15 01:37:48 -0700
committerH. Peter Anvin (Intel) <hpa@zytor.com>2019-08-15 01:37:48 -0700
commit566a0f21875f2a39cbbee43cb7bbd15b685a3feb (patch)
tree0b1af9b8a29610c2080e4df2271ab908d92dfa26
parent97cbdd34d093d8f580b57c1d73df2e3e100b67b9 (diff)
downloadnasm-566a0f21875f2a39cbbee43cb7bbd15b685a3feb.tar.gz
pptok.pl: don't leak internal codes into pptok.c
If we have internal codes in pptok.c, we may have false matches for them as tokens, plus, there is no reason for them to exist there. Go back to putting NULL in those slots. Signed-off-by: H. Peter Anvin (Intel) <hpa@zytor.com>
-rwxr-xr-xasm/pptok.pl2
1 files changed, 1 insertions, 1 deletions
diff --git a/asm/pptok.pl b/asm/pptok.pl
index e01334ff..a4853f2e 100755
--- a/asm/pptok.pl
+++ b/asm/pptok.pl
@@ -203,7 +203,7 @@ if ($what eq 'c') {
# Note that this is global.
printf OUT "const char * const pp_directives[%d] = {\n", scalar(@pptok);
foreach $d (@pptok) {
- if (defined($d)) {
+ if (defined($d) && $d !~ /[A-Z]/) {
print OUT " \"%$d\",\n";
} else {
print OUT " NULL,\n";