mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2025-03-24 03:02:31 +00:00
Fix order of operations for implicit casts
This commit is contained in:
parent
05f6ddbb13
commit
5374798ef9
1 changed files with 3 additions and 3 deletions
|
@ -956,9 +956,6 @@ binary_expr (int op, expr_t *e1, expr_t *e2)
|
|||
}
|
||||
}
|
||||
|
||||
et1 = low_level_type (t1);
|
||||
et2 = low_level_type (t2);
|
||||
|
||||
if (is_constant (e1) && is_double (t1) && e1->implicit && is_float (t2)) {
|
||||
t1 = &type_float;
|
||||
convert_double (e1);
|
||||
|
@ -968,6 +965,9 @@ binary_expr (int op, expr_t *e1, expr_t *e2)
|
|||
convert_double (e2);
|
||||
}
|
||||
|
||||
et1 = low_level_type (t1);
|
||||
et2 = low_level_type (t2);
|
||||
|
||||
if (et1 >= ev_type_count || !binary_expr_types[et1])
|
||||
return invalid_binary_expr(op, e1, e2);
|
||||
if (et2 >= ev_type_count || !binary_expr_types[et1][et2])
|
||||
|
|
Loading…
Reference in a new issue