[hackers] [scc] [cc1] Fix bug in field() || Roberto E. Vargas Caballero

From: <git_AT_suckless.org>
Date: Tue, 13 Dec 2016 17:59:11 +0100 (CET)

commit 40bd70689eb8d87e4cd48a31a9dcd235febcbe01
Author: Roberto E. Vargas Caballero <k0ga_AT_shike2.com>
AuthorDate: Tue Dec 13 17:57:01 2016 +0100
Commit: Roberto E. Vargas Caballero <k0ga_AT_shike2.com>
CommitDate: Tue Dec 13 17:57:01 2016 +0100

    [cc1] Fix bug in field()
    
    An anonymous struct had a NULL value in sym, not an
    empty string.

diff --git a/cc1/decl.c b/cc1/decl.c
index d4cbe17..a67149e 100644
--- a/cc1/decl.c
+++ b/cc1/decl.c
_AT_@ -616,7 +616,7 @@ field(struct decl *dcl)
 {
         static char *anon = "<anonymous>";
         Symbol *sym = dcl->sym;
- char *name = *sym->name ? sym->name : anon;
+ char *name = (sym->name) ? sym->name : anon;
         Type *structp = dcl->parent, *tp = dcl->type;
         TINT n = structp->n.elem;
         int err = 0;
Received on Tue Dec 13 2016 - 17:59:11 CET

This archive was generated by hypermail 2.3.0 : Tue Dec 13 2016 - 18:00:45 CET