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
|
@ -79,7 +79,7 @@ memory()
|
|||
|
||||
integer animation_menu(integer animation_menu_function)
|
||||
{
|
||||
if ((animation_menu_function == -1 || llGetListLength(MENU_LIST) < 2) && !helper_mode && llGetInventoryType(select_script) == INVENTORY_SCRIPT)
|
||||
if ((animation_menu_function == -1 || llGetListLength(MENU_LIST) < 2) && (!helper_mode) && llGetInventoryType(select_script) == INVENTORY_SCRIPT)
|
||||
{
|
||||
llMessageLinked(LINK_SET, 90009, CONTROLLER, MY_SITTER);
|
||||
}
|
||||
|
@ -214,7 +214,7 @@ integer animation_menu(integer animation_menu_function)
|
|||
if (animation_menu_function == 1)
|
||||
{
|
||||
integer pages = total_items / (12 - llGetListLength(menu_items2) - llGetListLength(menu_items0));
|
||||
if (!(total_items % (12 - llGetListLength(menu_items2) - llGetListLength(menu_items0))))
|
||||
if ((total_items % (12 - llGetListLength(menu_items2) - llGetListLength(menu_items0))) == 0)
|
||||
{
|
||||
pages--;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue