diff --git a/compiler/libpc300/sc1.c b/compiler/libpc300/sc1.c index 0fe2b086..00c73ae7 100755 --- a/compiler/libpc300/sc1.c +++ b/compiler/libpc300/sc1.c @@ -4833,7 +4833,7 @@ static void test(int label,int parens,int invert) if (parens) needtoken(')'); if (ident==iARRAY || ident==iREFARRAY) { - char *ptr=(sym->name!=NULL) ? sym->name : "-unknown-"; + char *ptr=(sym!=NULL) ? sym->name : "-unknown-"; error(33,ptr); /* array must be indexed */ } /* if */ if (ident==iCONSTEXPR) { /* constant expression */ diff --git a/compiler/libpc300/sc3.c b/compiler/libpc300/sc3.c index 13c45c42..d7857868 100755 --- a/compiler/libpc300/sc3.c +++ b/compiler/libpc300/sc3.c @@ -1045,10 +1045,10 @@ static int hier13(value *lval) array1= (lval->ident==iARRAY || lval->ident==iREFARRAY); array2= (lval2.ident==iARRAY || lval2.ident==iREFARRAY); if (array1 && !array2) { - char *ptr=(lval->sym!=NULL && lval->sym->name!=NULL) ? lval->sym->name : "-unknown-"; + char *ptr=(lval->sym!=NULL) ? lval->sym->name : "-unknown-"; error(33,ptr); /* array must be indexed */ } else if (!array1 && array2) { - char *ptr=(lval2.sym!=NULL && lval2.sym->name!=NULL) ? lval2.sym->name : "-unknown-"; + char *ptr=(lval2.sym!=NULL) ? lval2.sym->name : "-unknown-"; error(33,ptr); /* array must be indexed */ } /* if */ /* ??? if both are arrays, should check dimensions */