From dbe21979e4a4fa345a217b72bf06457b1e6de714 Mon Sep 17 00:00:00 2001 From: Zeex Date: Mon, 21 Apr 2014 17:06:42 +0700 Subject: [PATCH] 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 ----- --- source/compiler/sc1.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/compiler/sc1.c b/source/compiler/sc1.c index f69f439..9f59804 100644 --- a/source/compiler/sc1.c +++ b/source/compiler/sc1.c @@ -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 */