From 5c0d45aab3741f6d9cd860366e83d06c99c59bad Mon Sep 17 00:00:00 2001 From: Daniel_Cortez Date: Fri, 17 Nov 2017 23:08:52 +0700 Subject: [PATCH] emit/__emit: emit_param_data(): make sure the argument is not a function --- source/compiler/sc1.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/source/compiler/sc1.c b/source/compiler/sc1.c index 7a7f53d..6c7529f 100644 --- a/source/compiler/sc1.c +++ b/source/compiler/sc1.c @@ -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;