From f08fef5c8e3394a99ff6d635e6d61730ace7c208 Mon Sep 17 00:00:00 2001 From: Eli Linden Date: Wed, 28 Jul 2010 10:43:32 -0700 Subject: CT-575 WIP FR linguistic --- indra/newview/skins/default/xui/fr/strings.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/skins/default/xui/fr/strings.xml b/indra/newview/skins/default/xui/fr/strings.xml index 0a269016f5..ced100207b 100644 --- a/indra/newview/skins/default/xui/fr/strings.xml +++ b/indra/newview/skins/default/xui/fr/strings.xml @@ -1472,7 +1472,7 @@ Solde - Remerciements + Crédits Débits @@ -1787,7 +1787,7 @@ Solde - Remerciements + Crédits Débits -- cgit v1.2.3 From e27170de344a3c4fbeeeb8279f9eb8c7665a9216 Mon Sep 17 00:00:00 2001 From: "Brad Payne (Vir Linden)" Date: Wed, 28 Jul 2010 17:22:03 -0400 Subject: EXT-8221 FIX - fixed invalid array index in a vector --- indra/newview/llnearbychatbar.cpp | 46 +++++++++++++++++++++++++++++---------- indra/newview/llnearbychatbar.h | 2 +- 2 files changed, 36 insertions(+), 12 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llnearbychatbar.cpp b/indra/newview/llnearbychatbar.cpp index a300e15edd..8a52cf715f 100644 --- a/indra/newview/llnearbychatbar.cpp +++ b/indra/newview/llnearbychatbar.cpp @@ -317,9 +317,19 @@ void LLGestureComboList::refreshGestures() if (gestures) { - S32 index = gestures->getSelectedValue().asInteger(); - if(index > 0) - gesture = mGestures.at(index); + S32 sel_index = gestures->getFirstSelectedIndex(); + if (sel_index != 0) + { + S32 index = gestures->getSelectedValue().asInteger(); + if (index<0 || index >= (S32)mGestures.size()) + { + llwarns << "out of range gesture access" << llendl; + } + else + { + gesture = mGestures.at(index); + } + } } if(gesture && LLGestureMgr::instance().isGesturePlaying(gesture)) @@ -335,13 +345,13 @@ void LLGestureComboList::onCommitGesture() LLCtrlListInterface* gestures = getListInterface(); if (gestures) { - S32 index = gestures->getFirstSelectedIndex(); - if (index == 0) + S32 sel_index = gestures->getFirstSelectedIndex(); + if (sel_index == 0) { return; } - index = gestures->getSelectedValue().asInteger(); + S32 index = gestures->getSelectedValue().asInteger(); if (mViewAllItemIndex == index) { @@ -357,13 +367,20 @@ void LLGestureComboList::onCommitGesture() return; } - LLMultiGesture* gesture = mGestures.at(index); - if(gesture) + if (index<0 || index >= (S32)mGestures.size()) + { + llwarns << "out of range gesture index" << llendl; + } + else { - LLGestureMgr::instance().playGesture(gesture); - if(!gesture->mReplaceText.empty()) + LLMultiGesture* gesture = mGestures.at(index); + if(gesture) { - LLNearbyChatBar::sendChatFromViewer(gesture->mReplaceText, CHAT_TYPE_NORMAL, FALSE); + LLGestureMgr::instance().playGesture(gesture); + if(!gesture->mReplaceText.empty()) + { + LLNearbyChatBar::sendChatFromViewer(gesture->mReplaceText, CHAT_TYPE_NORMAL, FALSE); + } } } } @@ -374,6 +391,13 @@ LLGestureComboList::~LLGestureComboList() LLGestureMgr::instance().removeObserver(this); } +LLCtrlListInterface* LLGestureComboList::getListInterface() +{ + LLCtrlListInterface *result = mList; + llassert((LLCtrlListInterface*)mList==result); + return mList; +}; + LLNearbyChatBar::LLNearbyChatBar() : LLPanel() , mChatBox(NULL) diff --git a/indra/newview/llnearbychatbar.h b/indra/newview/llnearbychatbar.h index 83c174fd10..0eaa60ce81 100644 --- a/indra/newview/llnearbychatbar.h +++ b/indra/newview/llnearbychatbar.h @@ -68,7 +68,7 @@ public: ~LLGestureComboList(); - LLCtrlListInterface* getListInterface() { return (LLCtrlListInterface*)mList; }; + LLCtrlListInterface* getListInterface(); virtual void showList(); virtual void hideList(); virtual BOOL handleKeyHere(KEY key, MASK mask); -- cgit v1.2.3