From 836d4d9e355f7a0136bc1f966bfe8232f0a8975c Mon Sep 17 00:00:00 2001 From: Y_Less Date: Sat, 16 Jun 2018 09:53:14 +0100 Subject: [PATCH] Fix #317 --- source/compiler/sc1.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/source/compiler/sc1.c b/source/compiler/sc1.c index 54878fc..b3eddeb 100644 --- a/source/compiler/sc1.c +++ b/source/compiler/sc1.c @@ -3150,8 +3150,7 @@ SC_FUNC symbol *fetchfunc(char *name,int tag) sym=addsym(name,code_idx,iFUNCTN,sGLOBAL,tag,0); assert(sym!=NULL); /* fatal error 103 must be given on error */ /* assume no arguments */ - sym->dim.arglist=(arginfo*)malloc(1*sizeof(arginfo)); - sym->dim.arglist[0].ident=0; + sym->dim.arglist=(arginfo*)calloc(1,sizeof(arginfo)); /* set library ID to NULL (only for native functions) */ sym->x.lib=NULL; /* set the required stack size to zero (only for non-native functions) */