aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/linden
diff options
context:
space:
mode:
authorMcCabe Maxsted2010-04-26 00:45:59 -0700
committerMcCabe Maxsted2010-04-26 00:45:59 -0700
commited609248ec4d92e0b2fb96d28615035e26293019 (patch)
tree27a4e8ab43546a51ebc00a6451ed6ed9a8e308e4 /linden
parentFixed #199: After losing connection, 'Quit' button doesn't quit (diff)
downloadmeta-impy-ed609248ec4d92e0b2fb96d28615035e26293019.zip
meta-impy-ed609248ec4d92e0b2fb96d28615035e26293019.tar.gz
meta-impy-ed609248ec4d92e0b2fb96d28615035e26293019.tar.bz2
meta-impy-ed609248ec4d92e0b2fb96d28615035e26293019.tar.xz
Fixed #245: Script compile error from OpenSim crashes Imprudence
Diffstat (limited to 'linden')
-rw-r--r--linden/indra/llui/lltexteditor.cpp5
-rw-r--r--linden/indra/newview/llpreviewscript.cpp5
2 files changed, 9 insertions, 1 deletions
diff --git a/linden/indra/llui/lltexteditor.cpp b/linden/indra/llui/lltexteditor.cpp
index c4f839b..00fa517 100644
--- a/linden/indra/llui/lltexteditor.cpp
+++ b/linden/indra/llui/lltexteditor.cpp
@@ -886,6 +886,11 @@ S32 LLTextEditor::getCursorPosFromLocalCoord( S32 local_x, S32 local_y, BOOL rou
886 886
887void LLTextEditor::setCursor(S32 row, S32 column) 887void LLTextEditor::setCursor(S32 row, S32 column)
888{ 888{
889 // Make sure we're not trying to set the cursor anywhere
890 // it can't go by always setting the min to 0 -- MC
891 row = (row < 0) ? 0 : row;
892 column = (column < 0) ? 0 : column;
893
889 const llwchar* doc = mWText.c_str(); 894 const llwchar* doc = mWText.c_str();
890 const char CR = 10; 895 const char CR = 10;
891 while(row--) 896 while(row--)
diff --git a/linden/indra/newview/llpreviewscript.cpp b/linden/indra/newview/llpreviewscript.cpp
index be8396a..d200e32 100644
--- a/linden/indra/newview/llpreviewscript.cpp
+++ b/linden/indra/newview/llpreviewscript.cpp
@@ -1663,8 +1663,11 @@ void LLLiveLSLEditor::callbackLSLCompileFailed(const LLSD& compile_errors)
1663 line < compile_errors.endArray(); 1663 line < compile_errors.endArray();
1664 line++) 1664 line++)
1665 { 1665 {
1666 LLSD row; 1666 // Note: OpenSim screws up and sends the wrong values for (row, column).
1667 // (As of 2010-04-25: rows start at -1 instead of 0, and columns start at
1668 // 1 instead of 0) -- MC
1667 std::string error_message = line->asString(); 1669 std::string error_message = line->asString();
1670 LLSD row;
1668 LLStringUtil::stripNonprintable(error_message); 1671 LLStringUtil::stripNonprintable(error_message);
1669 row["columns"][0]["value"] = error_message; 1672 row["columns"][0]["value"] = error_message;
1670 row["columns"][0]["font"] = "OCRA"; 1673 row["columns"][0]["font"] = "OCRA";