mirror of
https://github.com/DarkPlacesEngine/gmqcc.git
synced 2024-11-27 22:22:17 +00:00
Only check the ast-type of a switch case, not if it's an ACTUAL constant, fteqcc doesn't either... grrr
This commit is contained in:
parent
10f49a38ca
commit
08ef8bd045
1 changed files with 1 additions and 1 deletions
2
parser.c
2
parser.c
|
@ -2162,7 +2162,7 @@ static bool parse_switch(parser_t *parser, ast_block *block, ast_expression **ou
|
|||
}
|
||||
if (!OPTS_FLAG(RELAXED_SWITCH)) {
|
||||
opval = (ast_value*)swcase.value;
|
||||
if (!ast_istype(swcase.value, ast_value) || !opval->constant) {
|
||||
if (!ast_istype(swcase.value, ast_value)) { /* || !opval->constant) { */
|
||||
parseerror(parser, "case on non-constant values need to be explicitly enabled via -frelaxed-switch");
|
||||
ast_unref(operand);
|
||||
return false;
|
||||
|
|
Loading…
Reference in a new issue