Fix enum range check
@@ -1711,6 +1711,7 @@ static int process_enum(fb_parser_t *P, fb_compound_type_t *ct)
} else {
if (member->value.type) {
index = member->value;
+ }
/*
* Captures errors in user assigned values. Also captures
* overflow on auto-increment on all types except maximum
@@ -1720,7 +1721,6 @@ static int process_enum(fb_parser_t *P, fb_compound_type_t *ct)
if (fb_coerce_scalar_type(P, sym, ct->type.st, &index)) {
return -1;
}
- }
member->value = index;
}
if (!first && P->opts.ascending_enum) {
