projects
/
platform
/
upstream
/
nasm.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
95e2882
)
pptok.c: handle holes in the pp_directives array
author
H. Peter Anvin
<hpa@zytor.com>
Wed, 12 Sep 2007 05:18:20 +0000
(
05:18
+0000)
committer
H. Peter Anvin
<hpa@zytor.com>
Wed, 12 Sep 2007 05:18:20 +0000
(
05:18
+0000)
We need to fail if we land in a hole in the pp_directives array, since
we have a noncontiguous enum preproc_token now.
pptok.pl
patch
|
blob
|
history
diff --git
a/pptok.pl
b/pptok.pl
index 9a00ea262df5a2cd8c0d8670d904912a4c179819..99efc38b4222c78a1d80455a462c4dbbfac6e117 100755
(executable)
--- a/
pptok.pl
+++ b/
pptok.pl
@@
-194,7
+194,7
@@
if ($what eq 'c') {
print OUT " return PP_INVALID;\n";
print OUT "\n";
- print OUT " if (nasm_stricmp(pp_directives[ix], token))\n";
+ print OUT " if (
!pp_directives[ix] ||
nasm_stricmp(pp_directives[ix], token))\n";
print OUT " return PP_INVALID;\n";
print OUT "\n";
print OUT " return ix;\n";