Read beyond buffer bugfix.

This commit is contained in:
carl 2019-03-31 00:53:09 +08:00
parent 4f2c482416
commit 715717a4f6

View file

@ -384,6 +384,8 @@ static void writeout(void)
{ {
printf(" &opchoice[%d], /* %d = %s */\n", elem[i], i, em_mnem[i]); printf(" &opchoice[%d], /* %d = %s */\n", elem[i], i, em_mnem[i]);
} }
printf(" &opchoice[%d], /* %d = %s */\n", elem[sp_lmnem - sp_fmnem + 1],
sp_lmnem - sp_fmnem + 1, "");
printf("} ;\n"); printf("} ;\n");
} }