emit/__emit: emit_param_data(): make sure the argument is not a function

This commit is contained in:
Daniel_Cortez 2017-11-17 23:08:52 +07:00
parent 5eb18c4eec
commit 5c0d45aab3

View File

@ -5923,6 +5923,10 @@ static void emit_param_data(ucell *p,int size)
error(17,str); /* undefined symbol */
break;
}
if (sym->ident==iFUNCTN || sym->ident==iREFFUNC) {
emit_invalid_token(teDATA,((sym->usage & uNATIVE)!=0) ? teNATIVE : teFUNCTN);
break;
}
}
markusage(sym,uREAD|uWRITTEN);
p[curp]=sym->addr;