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:
H. Peter Anvin 2007-09-12 05:18:20 +00:00
parent 95e28828ab
commit 3100e6cb63

View File

@ -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";