Fix another error 33 crash

This fixes the same coding mistake as in the previous commit (4d2c600):
"sym->name!=NULL" should be "sym!=NULL" as sym->name can't be NULL.

--------- test code --------

main() {
	if ("string") {}
}

----- end of test code -----
This commit is contained in:
Zeex 2014-04-21 17:06:42 +07:00
parent 4d2c600507
commit dbe21979e4

View File

@ -5185,7 +5185,7 @@ static int test(int label,int parens,int invert)
if (endtok!=0)
needtoken(endtok);
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 */