diff options
author | Melanie | 2012-10-03 17:11:02 +0200 |
---|---|---|
committer | Melanie | 2012-10-03 17:11:02 +0200 |
commit | fdacb88b29d5b4a0eac87712992a0ccb2bbcab42 (patch) | |
tree | 402a7d61768fb3be790e6914a804cf8a746e5c91 | |
parent | Attempt to fix Mantis #6311. Honor a destination folder if one is given (diff) | |
download | opensim-SC-fdacb88b29d5b4a0eac87712992a0ccb2bbcab42.zip opensim-SC-fdacb88b29d5b4a0eac87712992a0ccb2bbcab42.tar.gz opensim-SC-fdacb88b29d5b4a0eac87712992a0ccb2bbcab42.tar.bz2 opensim-SC-fdacb88b29d5b4a0eac87712992a0ccb2bbcab42.tar.xz |
Fix a viewer crash issue
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs index 05aaebf..adef0e6 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs | |||
@@ -4401,7 +4401,18 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
4401 | Vector3 av3 = new Vector3(Util.Clip((float)color.x, 0.0f, 1.0f), | 4401 | Vector3 av3 = new Vector3(Util.Clip((float)color.x, 0.0f, 1.0f), |
4402 | Util.Clip((float)color.y, 0.0f, 1.0f), | 4402 | Util.Clip((float)color.y, 0.0f, 1.0f), |
4403 | Util.Clip((float)color.z, 0.0f, 1.0f)); | 4403 | Util.Clip((float)color.z, 0.0f, 1.0f)); |
4404 | m_host.SetText(text.Length > 254 ? text.Remove(254) : text, av3, Util.Clip((float)alpha, 0.0f, 1.0f)); | 4404 | if (text.Length > 254) |
4405 | text = text.Remove(254); | ||
4406 | |||
4407 | byte[] data; | ||
4408 | do | ||
4409 | { | ||
4410 | data = Util.UTF8.GetBytes(text); | ||
4411 | if (data.Length > 254) | ||
4412 | text = text.Substring(0, text.Length - 1); | ||
4413 | } while (data.Length > 254); | ||
4414 | |||
4415 | m_host.SetText(text, av3, Util.Clip((float)alpha, 0.0f, 1.0f)); | ||
4405 | //m_host.ParentGroup.HasGroupChanged = true; | 4416 | //m_host.ParentGroup.HasGroupChanged = true; |
4406 | //m_host.ParentGroup.ScheduleGroupForFullUpdate(); | 4417 | //m_host.ParentGroup.ScheduleGroupForFullUpdate(); |
4407 | } | 4418 | } |