Permalink
Browse files

Fix SEGV from #996

  • Loading branch information...
1 parent 07dfdb4 commit 9983b884d84e894006a5af97b24bedfc8fd51f43 @NotFound NotFound committed Oct 12, 2013
Showing with 4 additions and 1 deletion.
  1. +4 −1 compilers/imcc/pcc.c
View
@@ -247,8 +247,11 @@ pcc_get_args(ARGMOD(imc_info_t * imcc), ARGMOD(IMC_Unit *unit),
for (i = 0; i < n; i++) {
SymReg *arg = args[i];
- if (arg->type & VT_CONSTP)
+ if (arg->type & VT_CONSTP) {
arg = arg->reg;
+ if (! arg)
+ IMCC_fatal(imcc, 1, "wrong .const value");
+ }
regs[i + 1] = arg;
flags = 0;

0 comments on commit 9983b88

Please sign in to comment.