mirror of
https://github.com/netwide-assembler/nasm.git
synced 2025-04-18 18:50:23 +08:00
pptok.c: handle holes in the pp_directives array
We need to fail if we land in a hole in the pp_directives array, since we have a noncontiguous enum preproc_token now.
This commit is contained in:
parent
95e28828ab
commit
3100e6cb63
2
pptok.pl
2
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";
|
||||
|
Loading…
x
Reference in New Issue
Block a user