From 127a1c877261a265752cd612b750ed25e9c73622 Mon Sep 17 00:00:00 2001 From: Bill Currie Date: Sun, 13 Feb 2011 15:19:55 +0900 Subject: [PATCH] Fix the creation of enum values. --- tools/qfcc/source/struct.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/qfcc/source/struct.c b/tools/qfcc/source/struct.c index c57967b47..b00723dc3 100644 --- a/tools/qfcc/source/struct.c +++ b/tools/qfcc/source/struct.c @@ -168,8 +168,8 @@ add_enum (symbol_t *enm, symbol_t *name, expr_t *val) name->type = enum_type; enum_tab = enum_type->t.symtab; value = 0; - if (*enum_tab->symtail) - value = ((symbol_t *)(*enum_tab->symtail))->s.value.v.integer_val + 1; + if (enum_tab->symbols) + value = ((symbol_t *)(enum_tab->symtail))->s.value.v.integer_val + 1; if (val) { if (!is_constant (val)) error (val, "non-constant initializer");