summaryrefslogtreecommitdiff
path: root/indra/newview/llautoreplace.cpp
diff options
context:
space:
mode:
authorAndrey Kleshchev <andreykproductengine@lindenlab.com>2024-05-31 17:44:29 +0300
committerAndrey Kleshchev <117672381+akleshchev@users.noreply.github.com>2024-06-01 09:30:27 +0300
commit3f150fbcf19cdfa205da1576386edc6ef2db1bda (patch)
treec8638f28315d5a8648c14f69462d81f363b3393a /indra/newview/llautoreplace.cpp
parent9f00bb19b189753d9f801e080a87c821dcdcc8af (diff)
viewer#1594 Add a "Cancel" button to exit the "New List" prompt
And fix infinite loop in replaceList. mLists[search_index] was extending size of the list indefinetely.
Diffstat (limited to 'indra/newview/llautoreplace.cpp')
-rw-r--r--indra/newview/llautoreplace.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/indra/newview/llautoreplace.cpp b/indra/newview/llautoreplace.cpp
index e1d494f7c7..08e09d2d22 100644
--- a/indra/newview/llautoreplace.cpp
+++ b/indra/newview/llautoreplace.cpp
@@ -536,11 +536,12 @@ LLAutoReplaceSettings::AddListResult LLAutoReplaceSettings::replaceList(const LL
S32 search_index;
LLSD targetList;
// The following is working around the fact that LLSD arrays containing maps also seem to have undefined entries... see LLSD-30
- for ( search_index = 0, targetList = mLists[0];
+ for ( search_index = 0;
!listFound && search_index < mLists.size();
- search_index += 1, targetList = mLists[search_index]
+ search_index += 1
)
{
+ targetList = mLists[search_index];
if ( targetList.isMap() )
{
if ( listNameMatches( targetList, listName) )