mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2024-11-10 23:32:09 +00:00
Fix the creation of enum values.
This commit is contained in:
parent
f24de89a2a
commit
127a1c8772
1 changed files with 2 additions and 2 deletions
|
@ -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");
|
||||
|
|
Loading…
Reference in a new issue