aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/ScriptEngine
diff options
context:
space:
mode:
authorlbsa712009-03-31 05:51:28 +0000
committerlbsa712009-03-31 05:51:28 +0000
commitfb9a358b797418fbc4c38dd9ec67e12bb5b7c98a (patch)
tree76d79c2b83945f40026e0dbb7558e909da173a43 /OpenSim/Region/ScriptEngine
parentThanks rtomita for a patch to add a handler for the RemoveInventoryObjects pa... (diff)
downloadopensim-SC-fb9a358b797418fbc4c38dd9ec67e12bb5b7c98a.zip
opensim-SC-fb9a358b797418fbc4c38dd9ec67e12bb5b7c98a.tar.gz
opensim-SC-fb9a358b797418fbc4c38dd9ec67e12bb5b7c98a.tar.bz2
opensim-SC-fb9a358b797418fbc4c38dd9ec67e12bb5b7c98a.tar.xz
* Refactored out and de-duplicated Base64ToString(string)
* Fixed minor typo
Diffstat (limited to 'OpenSim/Region/ScriptEngine')
-rw-r--r--OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs10
1 files changed, 2 insertions, 8 deletions
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
index e32f1b4..b01a4aa 100644
--- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
+++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
@@ -6824,16 +6824,9 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
6824 public LSL_String llBase64ToString(string str) 6824 public LSL_String llBase64ToString(string str)
6825 { 6825 {
6826 m_host.AddScriptLPS(1); 6826 m_host.AddScriptLPS(1);
6827 UTF8Encoding encoder = new UTF8Encoding();
6828 Decoder utf8Decode = encoder.GetDecoder();
6829 try 6827 try
6830 { 6828 {
6831 byte[] todecode_byte = Convert.FromBase64String(str); 6829 return Util.Base64ToString(str);
6832 int charCount = utf8Decode.GetCharCount(todecode_byte, 0, todecode_byte.Length);
6833 char[] decoded_char = new char[charCount];
6834 utf8Decode.GetChars(todecode_byte, 0, todecode_byte.Length, decoded_char, 0);
6835 string result = new String(decoded_char);
6836 return result;
6837 } 6830 }
6838 catch (Exception e) 6831 catch (Exception e)
6839 { 6832 {
@@ -6841,6 +6834,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
6841 } 6834 }
6842 } 6835 }
6843 6836
6837
6844 public LSL_String llXorBase64Strings(string str1, string str2) 6838 public LSL_String llXorBase64Strings(string str1, string str2)
6845 { 6839 {
6846 m_host.AddScriptLPS(1); 6840 m_host.AddScriptLPS(1);