Fix several calls that had wraparound hazards.
llGetSubString("abc", 3, -1) gives "abc"; llList2List(L, 1, -1) gives L when L has length 1. In general, llGetSubString or llList2List return the whole thing when the starting index is grater than the last element in the list. There were a number of spots with that hazard, so fix all we found.
This commit is contained in:
parent
aa9cba13a5
commit
bf8f10bfe6
15 changed files with 39 additions and 39 deletions
|
@ -193,7 +193,7 @@ integer animation_menu(integer animation_menu_function)
|
|||
}
|
||||
else
|
||||
{
|
||||
menu_items1 += llGetSubString(m, 2, -1);
|
||||
menu_items1 += llGetSubString(m, 2, 99999);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -227,7 +227,7 @@ default
|
|||
state_entry()
|
||||
{
|
||||
memory();
|
||||
SCRIPT_CHANNEL = (integer)llGetSubString(llGetScriptName(), llSubStringIndex(llGetScriptName(), " "), -1);
|
||||
SCRIPT_CHANNEL = (integer)llGetSubString(llGetScriptName(), llSubStringIndex(llGetScriptName(), " "), 99999);
|
||||
if (SCRIPT_CHANNEL)
|
||||
main_script += " " + (string)SCRIPT_CHANNEL;
|
||||
if (llGetInventoryType(main_script) == INVENTORY_SCRIPT)
|
||||
|
@ -323,7 +323,7 @@ default
|
|||
}
|
||||
else
|
||||
{
|
||||
current_menu = llListFindList(MENU_LIST, ["T:" + llGetSubString(llList2String(MENU_LIST, current_menu), 2, -1)]);
|
||||
current_menu = llListFindList(MENU_LIST, ["T:" + llGetSubString(llList2String(MENU_LIST, current_menu), 2, 99999)]);
|
||||
if (current_menu != -1)
|
||||
{
|
||||
current_menu -= 1;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue