mirror of
https://github.com/DarkPlacesEngine/gmqcc.git
synced 2025-02-20 18:32:01 +00:00
folder: fix -fperl-logic
This commit is contained in:
parent
6ea88c9a3f
commit
de12a24bc9
1 changed files with 4 additions and 2 deletions
6
fold.c
6
fold.c
|
@ -563,8 +563,10 @@ static GMQCC_INLINE ast_expression *fold_op_rshift(fold_t *fold, ast_value *a, a
|
|||
static GMQCC_INLINE ast_expression *fold_op_andor(fold_t *fold, ast_value *a, ast_value *b, float expr) {
|
||||
if (fold_can_2(a, b)) {
|
||||
if (OPTS_FLAG(PERL_LOGIC)) {
|
||||
if (fold_immediate_true(fold, a))
|
||||
return (ast_expression*)b;
|
||||
if (expr)
|
||||
return (fold_immediate_true(fold, a)) ? (ast_expression*)a : (ast_expression*)b;
|
||||
else
|
||||
return (fold_immediate_true(fold, a)) ? (ast_expression*)b : (ast_expression*)a;
|
||||
} else {
|
||||
return fold_constgen_float (
|
||||
fold,
|
||||
|
|
Loading…
Reference in a new issue