Fix precedence of the "!" logical NOT operator.
We knew that in OpenSim, the bitwise NOT "~" operator's precedence was broken (see <http://opensimulator.org/mantis/view.php?id=3268>), but it appears that the same bug affects the logical NOT operator "!" as well, so it needs parentheses when followed by more expressions.
This commit is contained in:
parent
d8069cd1a9
commit
4ed043d823
8 changed files with 12 additions and 12 deletions
|
@ -41,7 +41,7 @@ string FormatFloat(float f, integer num_decimals)
|
|||
f -= rounding;
|
||||
else
|
||||
f += rounding;
|
||||
string ret = llGetSubString((string)f, 0, num_decimals - !num_decimals - 7);
|
||||
string ret = llGetSubString((string)f, 0, num_decimals - (!num_decimals) - 7);
|
||||
if (llSubStringIndex(ret, ".") != -1)
|
||||
{
|
||||
while (llGetSubString(ret, -1, -1) == "0")
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue