mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2024-11-10 15:22:04 +00:00
Convert constant vector expressions in binary expressions
Fixes not being able to compare with eg [1, 2, 3]
This commit is contained in:
parent
319ecfbbfa
commit
d00a2ef82d
1 changed files with 2 additions and 0 deletions
|
@ -726,6 +726,7 @@ binary_expr (int op, expr_t *e1, expr_t *e2)
|
||||||
expr_type_t *expr_type;
|
expr_type_t *expr_type;
|
||||||
|
|
||||||
convert_name (e1);
|
convert_name (e1);
|
||||||
|
e1 = convert_vector (e1);
|
||||||
if (e1->type == ex_block && e1->e.block.is_call
|
if (e1->type == ex_block && e1->e.block.is_call
|
||||||
&& has_function_call (e2) && e1->e.block.result) {
|
&& has_function_call (e2) && e1->e.block.result) {
|
||||||
e = new_temp_def_expr (get_type (e1->e.block.result));
|
e = new_temp_def_expr (get_type (e1->e.block.result));
|
||||||
|
@ -735,6 +736,7 @@ binary_expr (int op, expr_t *e1, expr_t *e2)
|
||||||
return e1;
|
return e1;
|
||||||
|
|
||||||
convert_name (e2);
|
convert_name (e2);
|
||||||
|
e2 = convert_vector (e2);
|
||||||
if (e2->type == ex_error)
|
if (e2->type == ex_error)
|
||||||
return e2;
|
return e2;
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue