mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2025-05-31 16:51:08 +00:00
Make gcc accept the bitwise-boolean magic
Forgot to compile check...
This commit is contained in:
parent
9d2d33fa50
commit
32c21ec559
1 changed files with 1 additions and 1 deletions
|
@ -1445,7 +1445,7 @@ op_call:
|
||||||
// as division: -5 % 3 = -2, so need to add b (3 here)
|
// as division: -5 % 3 = -2, so need to add b (3 here)
|
||||||
// if c's sign is incorrect, but only if c is non-zero
|
// if c's sign is incorrect, but only if c is non-zero
|
||||||
int mask = (a ^ b) >> 31;
|
int mask = (a ^ b) >> 31;
|
||||||
mask &= ~!!c + 1;
|
mask &= ~(!!c + 0) + 1; // +0 to convert bool to int (gcc)
|
||||||
OPC.integer_var = c + (mask & b);
|
OPC.integer_var = c + (mask & b);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue