mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2024-11-10 15:22:04 +00:00
Fix a equality check typo.
Fixes bad code generation when assigning to vector.x in a function with no parameters and the vector is the first local var.
This commit is contained in:
parent
78e0a8dc52
commit
4828934e50
2 changed files with 15 additions and 1 deletions
|
@ -239,7 +239,7 @@ static __attribute__((pure)) int
|
|||
is_const_ptr (expr_t *e)
|
||||
{
|
||||
if ((e->type != ex_value || e->e.value->lltype != ev_pointer)
|
||||
|| !(POINTER_VAL (e->e.value->v.pointer) > 0
|
||||
|| !(POINTER_VAL (e->e.value->v.pointer) >= 0
|
||||
&& POINTER_VAL (e->e.value->v.pointer) < 65536)) {
|
||||
return 1;
|
||||
}
|
||||
|
|
|
@ -8,6 +8,20 @@ foo (float x, float y, float z)
|
|||
return v;
|
||||
}
|
||||
|
||||
float w;
|
||||
float h;
|
||||
|
||||
vector
|
||||
bar (void)
|
||||
{
|
||||
vector pos;
|
||||
|
||||
pos.x = w;
|
||||
pos.y = h;
|
||||
pos.z = 0;
|
||||
return pos;
|
||||
}
|
||||
|
||||
int
|
||||
main ()
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue