mirror of
https://github.com/DarkPlacesEngine/gmqcc.git
synced 2025-03-23 19:21:29 +00:00
Fix the -fcorrect-logic condition
This commit is contained in:
parent
0988b731b7
commit
68c4070f62
1 changed files with 4 additions and 2 deletions
6
parser.c
6
parser.c
|
@ -1910,8 +1910,10 @@ static ast_expression* process_condition(parser_t *parser, ast_expression *cond,
|
|||
}
|
||||
ifnot = !ifnot;
|
||||
}
|
||||
if (OPTS_FLAG(CORRECT_LOGIC)) {
|
||||
/* everything must use a NOT_ */
|
||||
if (OPTS_FLAG(CORRECT_LOGIC) &&
|
||||
!(cond->expression.vtype == TYPE_STRING && OPTS_FLAG(TRUE_EMPTY_STRINGS)))
|
||||
{
|
||||
/* non-floats need to use NOT; except for strings on -ftrue-empty-strings */
|
||||
unary = (ast_unary*)cond;
|
||||
if (!ast_istype(cond, ast_unary) || unary->op < INSTR_NOT_F || unary->op > INSTR_NOT_FNC)
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue