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:
Sei Lisa 2017-08-29 12:56:15 +02:00 committed by Sei-Lisa
parent d8069cd1a9
commit 4ed043d823
8 changed files with 12 additions and 12 deletions

View file

@ -206,7 +206,7 @@ remove_sequences(key id)
running_pointers = llDeleteSubList(running_pointers, index, index);
while (sequence != [])
{
if (!IsInteger(llList2String(sequence, 0)) && llList2String(sequence, 0) != "none")
if ((!IsInteger(llList2String(sequence, 0))) && llList2String(sequence, 0) != "none")
{
llMessageLinked(LINK_THIS, 90002, llList2String(sequence, 0), id);
}
@ -253,7 +253,7 @@ default
llMessageLinked(sender, 90101, llDumpList2String([llList2String(data, 0), "[ADJUST]", id], "|"), llList2String(data, 2));
if (id == llGetOwner())
{
is_running = (!is_running);
is_running = !is_running;
if (sender == llGetLinkNumber())
{
llRegionSayTo(id, 0, "Facial Expressions " + llList2String(["OFF", "ON"], is_running));

View file

@ -128,7 +128,7 @@ state prop
touch_start(integer touched)
{
if (!llGetAttached() && (prop_type == 2 || prop_type == 1))
if ((!llGetAttached()) && (prop_type == 2 || prop_type == 1))
{
llRequestExperiencePermissions(llDetectedKey(0), "");
}