aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/linden/indra/llui/lllineeditor.cpp
diff options
context:
space:
mode:
authorRobin Cornelius2010-10-09 10:20:10 +0100
committerMcCabe Maxsted2010-10-09 02:36:14 -0700
commit0e86bfee3d1dd0e42fef23293242f52793f08583 (patch)
tree2821da61456ca991758aa5bb0482af4ca8afe22f /linden/indra/llui/lllineeditor.cpp
parentChanged version to Experimental 2010.10.09 (diff)
downloadmeta-impy-0e86bfee3d1dd0e42fef23293242f52793f08583.zip
meta-impy-0e86bfee3d1dd0e42fef23293242f52793f08583.tar.gz
meta-impy-0e86bfee3d1dd0e42fef23293242f52793f08583.tar.bz2
meta-impy-0e86bfee3d1dd0e42fef23293242f52793f08583.tar.xz
Fix some STL errors highlighted by MSVC debug
Diffstat (limited to '')
-rw-r--r--linden/indra/llui/lllineeditor.cpp11
1 files changed, 10 insertions, 1 deletions
diff --git a/linden/indra/llui/lllineeditor.cpp b/linden/indra/llui/lllineeditor.cpp
index e73b287..a3785e4 100644
--- a/linden/indra/llui/lllineeditor.cpp
+++ b/linden/indra/llui/lllineeditor.cpp
@@ -416,7 +416,16 @@ void LLLineEditor::setText(const LLStringExplicit &new_text)
416 setCursor(llmin((S32)mText.length(), getCursor())); 416 setCursor(llmin((S32)mText.length(), getCursor()));
417 417
418 // Set current history line to end of history. 418 // Set current history line to end of history.
419 mCurrentHistoryLine = mLineHistory.end() - 1; 419 // RC Fix, its really not safe to just take 1 of the end itterator, if end==begin
420 // that leaves an invalid state upseting the secure STL checks
421 if(mLineHistory.empty())
422 {
423 mCurrentHistoryLine = mLineHistory.begin();
424 }
425 else
426 {
427 mCurrentHistoryLine = mLineHistory.end() - 1;
428 }
420 429
421 mPrevText = mText; 430 mPrevText = mText;
422} 431}