mirror of
https://github.com/DarkPlacesEngine/gmqcc.git
synced 2025-01-05 16:40:50 +00:00
replacing an error message in the enum parsing
This commit is contained in:
parent
0d9144eeff
commit
88cfa53dc2
1 changed files with 1 additions and 1 deletions
2
parser.c
2
parser.c
|
@ -3487,7 +3487,7 @@ static bool parse_enum(parser_t *parser)
|
||||||
old = parse_expression_leave(parser, true, false, false);
|
old = parse_expression_leave(parser, true, false, false);
|
||||||
asvalue = (ast_value*)old;
|
asvalue = (ast_value*)old;
|
||||||
if (!ast_istype(old, ast_value) || asvalue->cvq != CV_CONST || !asvalue->hasvalue) {
|
if (!ast_istype(old, ast_value) || asvalue->cvq != CV_CONST || !asvalue->hasvalue) {
|
||||||
parseerror(parser, "enumeration value for must be a constant");
|
compile_error(ast_ctx(var), "constant value or expression expected");
|
||||||
goto onerror;
|
goto onerror;
|
||||||
}
|
}
|
||||||
num = (var->constval.vfloat = asvalue->constval.vfloat) + 1;
|
num = (var->constval.vfloat = asvalue->constval.vfloat) + 1;
|
||||||
|
|
Loading…
Reference in a new issue