From 3100e6cb631dbd6225dd6464688ca6cedf670755 Mon Sep 17 00:00:00 2001 From: "H. Peter Anvin" Date: Wed, 12 Sep 2007 05:18:20 +0000 Subject: [PATCH] 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. --- pptok.pl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pptok.pl b/pptok.pl index 9a00ea2..99efc38 100755 --- 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"; -- 2.7.4