diff --git a/compiler/libpc300/sc2.c b/compiler/libpc300/sc2.c index 360d60a7..d5072cf4 100755 --- a/compiler/libpc300/sc2.c +++ b/compiler/libpc300/sc2.c @@ -2734,7 +2734,7 @@ SC_FUNC symbol *addvariable(const char *name,cell addr,int ident,int vclass,int * this special case. */ assert(vclass!=sGLOBAL || (sym=findglb(name))==NULL || (sym->usage & uDEFINE)==0 - || sym->ident==iFUNCTN && sym==curfunc); + || (sym->ident==iFUNCTN && sym==curfunc)); if (ident==iARRAY || ident==iREFARRAY) { symbol *parent=NULL,*top; diff --git a/compiler/libpc300/sc3.c b/compiler/libpc300/sc3.c index ee02b69e..a268a1b1 100755 --- a/compiler/libpc300/sc3.c +++ b/compiler/libpc300/sc3.c @@ -2047,7 +2047,7 @@ static int nesting=0; error(47); /* array sizes must match */ } /* if */ } /* if */ - if (lval.ident!=iARRAYCELL) { + if (lval.ident!=iARRAYCELL|| lval.constval>0) { /* save array size, for default values with uSIZEOF flag */ cell array_sz=lval.constval; assert(array_sz!=0);/* literal array must have a size */